Marvel Studios has proven itself more than capable of planning a shared universe and that is in no small part due to the hard work and dedication of Marvel Studios President Kevin Feige. The Marvel Cinematic Universe proper, comprised of more than 20 films produced over 11 years, is the result of careful planning and a combination of the right creative minds.
The studio president recently held a Reddit AMA and was able to provide a little more insight into how the Marvel Cinematic Universe functions from the creative side of things. Asked how far in advanced the MCU is planned, Feige answered, "We usually work with a specific 5 year plan at any given point but often have a general plan that extends much, much further."
That kind of planning was clearest in Phase 1, which began with Iron Man in 2008 and ended with Avengers in 2012 and left room for further development, ultimately leading to the climactic Avengers: Endgame. The most recent Avengers film also allows future films enough room to introduce grander stories and even more diverse characters.
In the past, Feige stated that Phase 4 will run between 2020 and 2024. The fact that these films have already been planned is the reason why -- despite Disney's acquisition of Fox -- the X-Men and other newly acquired superheroes will not appear in the MCU in the near future.