Here's an example of my 20th level adventure I ran at the end of a particularly campaign. In that campaign, we did "snapshots" I ran adventurers for the party at 5th, 10th, 15th, and 20th levels, so while it was a campaign it was designed as a series of 3ish adventures at a given level, and then with a large jump in levels and time.
The final mission: Kill Asmodeus. The entire campaign had been centered around this, and the party had ultimately done the following in previous adventurers. Note I didn't have official stats for Asmodeus at the time, so I just went nuts with him.
- Work with a cabal of genies to block Asmodeus' wishing power for a short period of time.
- Made a deal with a host of angels. The angels could not enter Asmodeus' lair due to his insane angelic wards, but they could fight the hoards of devils outside, giving the party time to work.
- Work with the avatar of destiny so that Asmodeus would be "greatly weakened" (aka beatable) on a specific day and time, and would be killable by a mcguffin.
- Setup a teleport blocker around the lair to ensure Asmodeus couldn't just plane shift or teleport out. It also blocked things like passdoor.
So as the party ported into the front of his lair, they had a teleport block preventing them from moving throughout the lair, and had a roughly 1 hour time limit to work. This focused the adventure and gave it limited scope (while teleport blocking is not often a good idea all the time, in this case it was baked into the previous work the party had done, and preventing the devils from using it against them either, so it was fair play all around).
A general summary on the encounters:
1) A room of fire proof devils with lava constantly filling the room.
2) An adamantine golem in anti-magic field with a hoard of devils (the golem is technically invulnerable in the AM field).
3) An underground cavern with a large body of water, that actually turned out to be a colossal water elemental. Within the water was 50 shadows.
4) 50 "custom monsters" that all can use magic missile at will. (so ~525 points of unstoppable force damage every round).
5) An arena with hordes of traps and monsters.
6) A character possessesing the class features of a 20th level fighter/barbarian/and paladin (one of my PCs from another game supped up for the challenge).
7) One final hoard of devils.
8) Asmodeus himself.
The 6 20th level characters beat all of it without losing a person. Asmodeus was killed in two rounds. Ultimately though the party was very happy, they saw how dangerous Asmodeus was (so they knew if they didn't rocket tag him they would get toasted), and they had to get pretty creative with ways to get through all the encounters. But honestly for this adventure I literally just threw the kitchen sink at them, not having a clue how they were going to survive it. But....they did anyway.