AFAIK, the only sci-fi show with a pre-planned multi-year arc was Babylon 5 and even in that case there were heavy modifications to the original outline made along the way.
Well, it was the first
one with a pre-planned multi-year arc, but that's become a lot more common since then. Still, any such plan needs to be flexible and open to change. Like the saying goes, no plan survives an encounter with the enemy. (In fact, I first came across that saying in J. Michael Straczynski's book on screenwriting.) Lots of series have general plans for the character arcs, but they're not mapped out episode-by-episode for years in advance; they're more just loosely defined goals and key events that need to happen somewhere along the way, with plenty of flexibility about the when and the how, and with room to revise plans if the story starts to veer in an unexpected but interesting direction.
Personally, I think DS9 made a mistake by letting the Dominion War drag out all the way to the end of the series. They should've wrapped it up sooner and dealt with the aftermath.