This post contains MAJOR SPOILERS for Captain Marvel and speculation about Avengers: Endgame.
The Avengers' emergency plan to prevent Thanos from getting all of the Infinity Stones didn't work in Infinity War, but Nick Fury's ultimate backup plan might have the power to save more than just half the universe. Captain Marvel might be able to ensure the Snap never happened in the first place, and save Vision!
There's only one known way in the MCU to destroy an Infinity Stone, and it's not putting it down a garbage disposal like Tony Stark suggested. When the Avengers learned Thanos was coming for the Mind Stone, Vision said, "If it were exposed to a sufficiently powerful energy source, something very similar to its own signature perhaps, its molecular integrity could fail." That similar power source could only come from Wanda Maximoff, a.k.a. Scarlet Witch, because she gained her abilities from the Mind Stone when she volunteered for HYDRA's experiments with Loki's scepter.
While the Avengers tried to save Vision's life in Wakanda by having Shuri safely remove the stone from his head, she didn't have enough time to complete the operation. Wanda was then forced to destroy the Mind Stone using her powers in a last ditch effort to prevent Thanos from gaining the final stone. And it worked; the Mind Stone shattered into pieces in a massive explosion, causing Vision's death. Unfortunately, no one counted on Thanos using the Time Stone to travel back a minute to rip the intact stone from Vision's head (killing him again).
Now, it appears Captain Marvel almost certainly has the ability to destroy a separate Infinity Stone. As we saw in Captain Marvel, Carol Danvers gained her powers when Wendy Lawson's lightspeed engine, powered by the Space Stone (via the Tesseract), exploded. So Carol's powers should be able to shatter the Space Stone the way Wanda's powers did the Mind Stone.
On a universe-sized scale, that could be exactly what the Avengers need her to do if they travel back in time in Endgame the way we expect them too. Captain Marvel could go to the past (either years earlier or to Wakanda in Infinity War) and destroy the Space Stone before Thanos ever gets it, making the Snap impossible in the first place.
No matter the exact scenario of Avengers time-hopping, Carol's presence pre-Snap would mean Vision's death would no longer have to be the backup plan. The Space Stone isn't connected to anyone's head like the Mind Stone is, so Carol Danvers can destroy it without sacrificing anyone. And without needing to avoid the fight, the powerful Vision can use the power of the Mind Stone to help battle Thanos, something he mostly had to avoid doing in Infinity War while Shuri tried to save him.
Plus, getting Carol Danvers to join the fight could be a two-for-one deal on superheroes powered by Infinity Stones. Combined with Scarlet Witch, that's a fearsome trio.
As Vision said about the Mind Stone, "Eliminating the stone is the only way to be certain that Thanos can't get it." No one will ever be able to dust half the universe in the snap of a finger if Captain Marvel destroys the Space Stone for good. You don't need the power of the Mind Stone to see how that makes for a safer vision of the future, for both half the universe and one very brave Avenger.