Or just throw in a Terrasque and tell them "gg".
The
Tarrasque can be defeated pre-epic with a moderate amount of effort. It is not an epic level challenge in either sense of the word.
For example, it doesn't have fly. This means it is a nonthreat to anyone who can fly. It also can't sense invisible things aside from listening to them.
It has a lot of HP, and high AC, plus various immunities. This makes a "frontal assault" difficult. However, it has a touch AC of 5 and is not immune to ability drain. Therefor, one could, say, send
Allips at it and drain its wisdom to zero, putting it into a comatose state. (Unless I misunderstand how ability drain works, in which case let us move on.)
858 HP and regeneration 40 make it hard to kill with damage, but Vile damage can't be regenerated from, and metamagicked Orbs can deal hundreds of damage individually. Just tack on
Violate Spell and you should be good to go. (Unless I misunderstand how Vile damage works, in which case let us move on.)
It can't knock down Walls of Force. Throw up four walls around it during a Time Stop. This gives you a few rounds to pull shenanigans while it's behind bars.
You can use Shapechange to turn into a Zodar each round and use Wish 1/round as a (Su) ability If you have prepared a trap beforehand, such as having a reservoir full of water covered by rocks that were created from Polymorph Any Object'd sand, you could dispel the sand and send the Tarrasque into the water, cover it in a Wall of Iron, and have it drown before it tunnels out. (You'll need to have thick walls and work out many technical issues, but this is doable in principal, if a little labor intensive.)
Once it drowns, it will regenerate, but stay unconscious. Whee! That was complicated, now wasn't it?
Reverse Gravity it into a Gate and send it through to a different plane.