It's been steadily declining for a while now, but not rapidly. They will probably just keep merging servers until there's just a couple of servers left, and keep it alive just because it's a main series game and they don't want to kill it off just because of that.
If they stopped releasing new content updates and had just one single server, I can't imagining it costing them a significant amount of money to keep alive. Even if you still had GMs at that point, you'd probably just need something like two, one for EU/US timezones and one for japan, because of the low population the game would have.
I don't think a total player base of 5000-10000 people would have a problem paying for all that, and that would be less than 5% of what the player base is today.
Unless they completely destroy everything with the new expansion pack, I don't think the game is going to be shut down in the next five years, and it wouldn't surprise me if the game was still breathing even ten years from now, if just barely.
I think an offline version is unlikely, though. I think they'd be more likely to release the server software to the public, for fans to run it themselves, after the game is no longer profitable for them.