I recently DMed a battle that went better than I could possibly have planned.
In the old-fashioned, relatively linear, non-OGT campaign (which I've been calling "the summer campaign", for reasons of I'm running it now and it is currently summer) I've been running recently, I still sometimes use random encounter tables. Specifically, because it's set in the same world as my OGT, I use the same random encounter tables as I use for my OGT. (Though the summer campaign is set so far in the Omorashi Empire, while OGT is in Gus, so it's more like a set of tables that are in the same Excel document as my OGT tables, but which had not yet been used.)
Anyway, for a small town that has become completely taken over by goblins, I put together some creatures. For variety, there's goblins, hobgoblins, bugbears, bakemonos (Oriental Adventures; I took the line that "bakemonos are the 'goblins' of the Shadowlands" a little more literally than OA intended, and declared them a form of goblin native to the Omorashi Empire (to whatever extent "native" can describe a country that's only existed for 20 years)), mites, pesties, and nilbogs (Tome of Horrors, which I recently discovered and love, full of all the monsters from earlier editions that were too horrible or ridiculous to ever get officially ported to 3e (except even ToH lacks the duckbunny)). They're all led by an ogre monk, and I whipped up some goblin spellcasters for support.
I think I may be embarking upon a half-deliberate attempt to screw every character over in combat, one at a time. This time, it's the ranger's turn: the spellcasters have obscuring mist and fog cloud, and the ogre has Deflect Arrows. Next up: solid fog, web, and undead/oozes/elementals, to annoy the scout! Non-Humanoids to annoy the beguiler! Intelligent, mind-control-resistant humanoids to annoy the Vow Of Peace cleric! Lawful Good yet hostile foes to annoy the paladin! Hostile dragons to annoy the dragon shaman! Or something along those various lines.
Anyhow, the relevant feature of this post: spellcasters! I slapped fiendish and 3 levels of shaman (an OA class that's like the cleric but more interesting) on goblin and called it a yaoguai. The relevant features are cure moderate wounds, hold person, fog cloud, obscuring mist, shield of faith, cure light wounds, burning hands, and some orisons. Also, each yaoguai starts with 1d4-1 random minor scrolls, for variety.
So, for one of the wandering monster fights, I roll... 8 yaoguais. Approximately a level 9 encounter. Needless to say, a very tough fight for an ECL1-2 party. (Most of the party wound up gettting enough XP to level.) And it went fantastically.
So the yaoguais cast some Obscuring Mist/Fog Cloud to annoy the ranger. Then the party took out a couple yaoguais. Then the yaoguais started using their Cures to bring their companions back up, their Hold Person to incapacitate the scout (they tried it on the ranger and discovered that he's not a humanoid), and Burning Hands to wreck the party's crap.
One of the yaoguais summons a huge fiendish centipede. The paladin charges and uses Smite Evil on it. The centipede uses Smite Good on the paladin, prompting entertaining incredulity. The centipede's time runs out and it vanishes.
Anyway, the yaoguais swiftly take down the entire party except for one or two. Every yaoguai that's gone down has gotten a heal and popped right back up again. And all looks lost for our heroes!
Except then the yaoguais all run out of all their decent spells, and have to resort to converting their orisons to inflict minor wounds or trying to punch for 1d2-2 damage. (Shaman at least gets Improved Unarmed Strike for free, so at least they weren't provoking with their attacks.) And the party manages to get enough healing potion down the dragon shaman that he can reactivate his vigor aura. And then it's all over and the yaoguais are suddenly easy to take down.
Why do I say this went fantastically? Because coming back against overwhelming odds from the brink of defeat is awesome. Turning a near party-wipe into a victory is awesome. (I don't really know how well the players actually liked it, because it took all night, they were exhausted by the end, and then they immediately barged into the library and discovered the ogre monk, for whom they were woefully unprepared. But I thought it was fantastic.)
And to what do I ascribe this fantasticness? All of the foes were pure spellcasters, with no melee support or capability at all. Going nova by blowing all their good spells in the first few rounds of combat allowed the yaoguais to almost, but not quite, win. Having done that, and no longer having any decent spells left, then allowed the PCs to win handily.
An encounter of nothing but pure spellcasters, with just enough power to almost wipe the party. Don't do it too often, lest it get old, but try it once or twice.
And, as a side note, this is also one of the reasons why wandering monster fights are good. You might wind up accidentally rolling an encounter it would normally never occur to you to throw at the party, and that encounter might turn out to be amazing and might give you completely new ideas to add to your DMing repertoire.