Warning: SPOILERS for Avengers: Infinity War are ahead!
Although the events of Avengers: Infinity War were years in the making, one of the more important movies that led up to this major event was Captain America: Civil War. As the first Phase 3 movie, and a year after Avengers: Age of Ultron, Civil War showed Earth's Mightiest Heroes being fractured due to differing opinions on the Sokovia Accords. But now that Infinity War has been released, there's particular scene from Civil War that appears to foreshadow the fates of some of the MCU's heroes following Thanos' Infinity Stones-powered snap.
The above Captain America: Civil War moment depicts the then-Avengers lineup, as well as a visiting Tony Stark, listening to Secretary of State Thaddeus "Thunderbolt" Ross. At the time, this scene was notable for bringing in the Sokovia Accords, which, similar to the Superhuman Registration Act in the Marvel Comics universe, would regulate enhanced individuals. However, as ComicBookMovie noted, the way Earth's Mightiest Heroes are arranged foreshadows who will live and who will die at the end of Avengers: Infinity War. On the right, we have Falcon, Vision and Scarlet Witch. Vision perished when Thanos removed the Mind Stone from the android's head, and Falcon and Scarlet Witch turned to dust after that now-iconic snap. Then on the left, we have Captain America, Black Widow and War Machine at the table, all of whom made it out of Infinity War intact. Tony Stark also survived, and his placement in the corner seemingly represents that he was out in space during most of Infinity War, while the other pictured heroes held their ground on Earth, particularly Wakanda.
Whether this was done intentionally or it's just a happy accident, it is cool to see that Captain America: Civil War teased what would happen to some of its starring heroes in two years time. One important thing to remember is that Civil War and Avengers: Infinity War were both penned by the same writers, Christopher Markus and Stephen McFeely, as well as directed by the same duo, Joe and Anthony Russo. Like Civil War, Infinity War was publicly announced as part of the Phase 3 slate in late 2014, although neither duos didn't sign on to write Infinity War (and Avengers 4) until 2015. Nevertheless, it's entirely possible that while they were writing Civil War, one of these duos had been given some information about Infinity War that had already been hashed out by Kevin Feige and other bigwigs at the studio, namely who would live and die. Keeping that in mind, perhaps they threw in this bit of foreshadowing for fun... or maybe I'm just looking too deeply into this.