This article says why the lifetime of the Webb telescope is limited by the fuel it carries. Why NASA’s James Webb Space Telescope Will Never Live As Long As Hubble
In short, Webb must stay near the Earth and Moon for radio contact, while pointing away from the Sun, Earth, and Moon to stay cool. It can do this near the L2 Lagrange point while using very little fuel.
When it runs out of fuel, it will drift away. There will no longer be a single direction to the Sun, Earth, and Moon. At some point, there is no direction where all three are out of Webb's field of view.
When it does run out of fuel, I can imagine simplistic ways to rescue it. Of course it is never as easy as it sounds. But I am wondering what is wrong with these thoughts.
Build a spacecraft whose sole purpose is to hold onto Webb's hot side and use its engine to position the pair. Granted, Webb wasn't designed to be held, but how hard can it be?
When Webb runs out of fuel, it will drift away from the L2 point. It will still be able to run its reaction wheels and cryocooler from its solar panels. Keep it pointed away from the Sun. At some point, Earth will drift into the field of view of its cold side.
Send out a large sunshade which will stay between it and Earth, keeping it cool.
- Let Earth drift into the field of view. Webb will warm up. It will become insensitive to longer wavelengths. Perhaps it will not be able to see any of its design wavelengths.
Earth will drift away and Webb will cool down again.
One might help this idea out by using the last of its fuel to launch it away from the L2 point. By the time Earth drifted into view, Webb would be far from Earth.
- If we can stay in radio contact with Voyager, we can stay in radio contact with Webb even if it was on the opposite side of the Sun.