It seems that when Markus and McFeely were writing the script for “Avengers: Infinity War,” they didn’t yet have a solid conclusion in mind. “Infinity War” ends on a cliffhanger, with Thanos having snapped his fingers and erasing half of all living things from the universe. The heroes, now mostly dead, are all sad and Thanos retires to the countryside. This author would have loved to have seen the entire Avengers film series end on that note of failure and sadness, but this author just happens to love sad, depressing movies. 

Markus noted that time travel was an obvious and uncreative story choice, but that lingering plot threads from Peyton Reed’s films “Ant-Man” (2015)  and “Ant-Man and the Wasp” (2018) allowed for time travel conceits to be introduced in a somewhat organic fashion. He said: 

“This [scene] … sort of mirrors us sitting in a room, trying to figure out how the hell to get out of the corner we wrote ourselves in at the end of ‘Infinity War,’ and entertaining the idea of a time machine, and then feeling that that was the stupidest idea you could possibly have. But then realizing that the ‘Ant-Man’ franchise, which we hadn’t dealt with yet, had legitimately — if you believe the science — the seeds of a time machine in it, which was a breakthrough.”

The “Ant-Man” movies featured a character who could shrink down to subatomic sizes. It seems that when one shrinks down that small, time moves differently. Ant-Man (Paul Rudd) spent five hours at subatomic sizes, but five years had passed in the normal-sized world. The Avengers use sci-fi technology to turn that phenomenon into a time machine. It’s as believable as anything else in a superhero universe. 

 The writers for Marvel’s Avengers: Endgame know that time travel doesn’t exist, but the Ant-Man films teed up the concept perfectly.  Read More  

By