Stellaris does a fantastic job at this.
Stays relevant until the very end.
Stays relevant until the very end.
I tried a few other 4X space games, but none scratched the itch that Stellaris did. It's the only 4X space game I play now. And Paradox keeps adding content!
At that point you're strong enough that you can beat all the other empires but then an extra-dimensional invasion happens that's just so much stronger than anything else you've encountered and it works really well to spice up the late game and make everything relevant again.