DM: What if you pulled a fast one on Discord?
Fluttershy: How?
DM: Some way we didn't plan for. Discord's protecting himself with an unstable dimensional shield of sorts that randomizes the Ponyville that anyone enters. Unless he wills it, it's never the "correct" one with his throne of chaos from which he rules over the world. He figured you'd recover your friendship eventually, but his plan was to buy just enough time to make himself untouchable before that happened.
Rainbow Dash: Man, when you spell it all out, that's super cowardly.
DM: <ahem> But you still have the Elements of Harmony, basically fully powered. The Elements can't break through the dimensional shield, but… that's what he's expecting you to try.
Applejack: So our Elements can… do something else about that?
DM: Perhaps. They're potent magical artifacts, and the full extent of their powers hasn't been explored. The specifics I'll leave to you; I just want to inform you this option exists.
Twilight Sparkle: Wait. You said "pull a fast one"… Can we do something without Discord noticing??
DM: He's probably quite busy living it up. The Eye of Sauron is distracted, as it were.
If I was a player, I would go with a psychological tactics.
I would (at least initially) assume that, however clever Discord is, his vulnerability-to-boredom is stronger than his willingness-to-stick-to-his-plan. I'd try to make things as boring for him as possible, to MAKE him eventually confront my group head on and--
...oh, right, "making things boring for Discord" was a tactic that Fluttershy already used... but then again *she* used this tactic to make Discord STOP interacting with her...
...anyways that's a terrible plan. The Mane Six are not the only ponies that could be the source of amusement for D. He could still torment and have fun with everypony ELSE, besides them.
I really like this plan actually. Sure, Discord might last a while tormenting other ponies, but he wouldn't enjoy the game nearly as much if there was no possibility of failure. He'd eventually want to dangle hope in front of the ponies, and eventually he'd let slip a little too much, and bam, over.
Well, they could take a page from original James T Kirk and defeat him with an impassioned bout of slightly spurious logic that causes his brain to explode
This is usually what Wizards do when they're done gaining power at absurd speeds via slaying monsters. Private Demiplanes are a common theme.
There's also that one Level 16 Wizard called Eziah in the Pathfinder (D&D 3.75) setting that decided he'd had enough and settled on the sun. He's literally 1 level away from casting 9th level spells, but then just said, "Nah, I'm good" and left for his floating tower on the sun. Best part is, he's not anyone super important, just a footnote in one of the Lore books, but he has such a ridiculous story that it's impossible not to like the guy.
The problem is getting to Discord, and the ponies will almost certainly enter a Ponyville in which Discord isn't. Maybe they could use the Elements of Harmony to open a portal to the location of a particular friend of theirs named Discord.
One day the DM will learn that it's ok for players/PCs to ruin your bad guys' plans/what you thought the campaign will be like, rather than go "ok, there's this one way to win how are you doing it?"
Been meaning to write this into a fic, but...
Briar-patching. Figure out a way to make Discord THINK he's the one getting one over, when that's actually your plan.