Marvel planned out ten movies ahead for Phase 3 including 3 movies with the same writer/director combination.
Marvel has 10 movies planned out like Lucasfilm had 3 movies planned out for Star Wars. It's basically 'we will make Black Panther and then Ant-Man 2 and Captain Marvel etc. The stories of those 10 movies were defintely not plottted out way in advance. At most they will have had a vague idea of where it all was going. Apart from that, Marvel is basically a series of loosely tied stand alone films, where apart from the Avenger films one movie only has a slight influence on the next one.
People tend to forget the whole 'is Thanos in this meme', because the MCU was so well thought out in advance they had Thanos pop-up in the stinger of the first Avengers (iirc EDIT: was in Ultron apparently) saying: fine, I'll do it myself, only to just disapaer for the next 15 (EDIT: 7 then?) films (aside of a small part in a movie that was way removed from everything else at the time)
The reality of filmmaking is: unless you film back to back, you don't plot out your series long beforehand. Why? Because stuff gets changed and rewritten all the time. Sometimes shit works in a treatment, but once you put it in screenplay format it falls flat, or you come up with better ideas/discover new ways. Movies are often still being written when the camera's already roll, and after the shoot in editing stuff gets turned around again too. By the time you are at movie 3 you can probably throw away half of the plot beats you've written out 5 years ago. And sometimes stuff happens outside of your power. I mean, between 2013 when they started on this trilogy and now Carrie Fisher died. That would have put a big wrench in a 'thoughtfully plotted out trilogy' for sure.
The way they are going at it is the most realistic of all, and the way movies generally are made. You write a sequel based on what the first movie set up, and try to find the most interesting and logical follow-up. TLJ does exactly that, picking the characters up where they left of and figuring out the most interesting arcs they can complete. Meanwhile also answering the big question TFA explicitely set up (you might not like the answer, but it's still an answer) and putting everything in place for the finale (meaning: bringing your characters at a low point with a great obstacle before them, but with the gained wisdom to overcome it. The exact point an act 2 in general ends)