In the past, I've thought about outright banning lockpicking in order to make the players play my game and go find the keys I've hidden, because they always pick my locks, or break down my doors, or have access to a spell that creates a tunnel in the wall, or just dig a tunnel in the wall.
One time I suspended my players fifty feet below an airship in a cage attached with chains on every corner with no equipment. One guy managed to squeeze through the bars, got on top of the cage, cut one of the chains halfway up, and slung the half that was attached to the cage over the side. One of the PCs inside the cage broke a hole in the wooden floor of the cage, pulled the chain inside, and voila! Everyone swung out on the chain, and climbed to the top of the cage. Some of the PCs weren't so good at climbing, but that was short work for another PC with a climb-enhancing spell.
I had designed it as an inescapable situation to force the PCs into their first confrontation with the campaign's main villain. When they found a way out, I did the wrong thing. I punished them and sent them back.
Wait a second! Ingenious players are what you want! I've spent tons of time moping about how my players resolve every situation with wholesale slaughter, and now when they show some creativity, I squash it! What was I thinking?
Good players will, despite your best efforts, be powerful or ingenious enough to bypass all your prepared material. And if you've ever heard someone complain that D&D 3.5 characters over level 14 are "broken" or "unplayable," chances are they've had the same problem.
Today, though, I was watching Doctor Who, and something clicked for me.
From a D&D perspective, The Doctor is an insanely overpowered character. His sonic screwdriver picks any lock from any time period, he can bluff his way through any situation, and constantly manages to find access to doomsday weapons that conveniently destroy all of his enemies in one go. If he's killed, it's no problem. It just means we get a new actor.
In an awful lot of episodes, The Doctor finds himself in a position where he needs to get into a high-security area, and speak with an important person. Often it's the leader of an entire species. The show never wastes time putting obstacles in his way. Once the Doctor decides to go somewhere, it's pretty much a guarantee that he'll be there in less than a minute.
When The Doctor encounters an evil warrior race, you don't have to wait until the end of the episode to know that they will be completely extinct in forty-five minutes.
And yet, while watching Doctor Who, I've never thought to myself, "where's the conflict? Where's the excitement if the overpowered hero always predictably wins?"
If I had The Doctor as a player, I'd probably be moaning about how he ruined all my scenarios, ban some diplomacy-enhancing feats, and give him a +5 vorpal sword and some mutants to kill to make him feel better.
But as a player, The Doctor is everything I'd ever want to be.
So I've thought it through, and I think that I've come up with a few television-inspired ways of dealing with "overpowered" PCs who foil all your plans.
1. The conflict should have higher stakes than the PC's lives. Players at these levels know they're not going to die, so don't jerk them around. Make them care about innocent NPCs, and put them in real danger. Put them in situations where you don't think the PCs can save them all, and see what they do.
2. If the PCs aren't moral enough to question weather they should kill the main boss outright (hint: they never are), find a way to add an extra ethical dimension to their actions. Maybe they can't destroy his starship without killing the crew's innocent families. Maybe the evil army is under mind-control, and will drop dead if their master is killed. Maybe the evil wizard guards his domain from an even greater evil. This probably won't make much of a difference if you don't have the right kind of players.
3. Increase the stakes. In Doctor Who, and in most TV and movies, really, most monsters can kill you in one attack. Rarely is anyone wounded. You're either alive and well, or they catch you, and you're dead. If your players are dishing out enough damage to kill anything in one hit, then maybe the monsters should be able kill the players in one hit. I'm not saying that you should kill your players. I'm saying that when the players meet a really powerful new monster, maybe their first instinct should be to run.
4. Villains are never really dead. The players want to vanquish every evil you set in front of them. You want to build interesting recurring villains. The perfect compromise is to let them kill the villains, and then bring them back anyway. Conventional wisdom says that players will be frustrated if their enemies don't stay in the ground. I say, that's ridiculous. Players want to beat their villains, but they also want good villains to fight.
If the game specifically has abilities that force enemies to stay dead, then bring in a twin, a clone, someone else to take up the mantle, a mechanical replica, the villain's brain in a jar, a parallel universe duplicate, a parallel universe, a ghost, a son or daughter, a posthumous plot, an illusion, a time travel plot that takes the players to before his defeat, a time travel plot that prevents his defeat, an unseen/unnoticed escape, an ingeniously faked death, a decoy, or any other of the many, many tropes that exist for bringing favorite villains back for another round.
5. If your problem is that players are bypassing every obstacle, then the "obstacle" thing isn't going to work anymore. Don't put obstacles in their way that are designated as "unbypassable," and justify them as "made of diamond/mithral/adamantium/lead." Let them skip straight to the boss if they like, and when they get there, make it apparent that killing the boss isn't going to solve the real problem, which they'll only be able to solve if they poke around a bit.
6. It's OK for enemies to be immune to everything, except for one oddball weakness. In most games I've played/run, knowing a creatures weakness just allows you to kill it faster, and save some spells. Bring in an alien species that's immune to ABSOLUTELY EVERYTHING except for one seemingly innocent Achilles heel. Then make the players put the clues together as they run and hide from the seemingly invincible threat. Players who love combat will hate this one, but for most other players, combat is a forgone conclusion at this level anyway, so why not make it impossible without a little bit of detective work?
7. Surprise them. The boss they picked three locks to reach isn't the real boss at all. The NPC they trusted, meanwhile, has lured them right into her trap. The monster was disguised as something more harmless, or even familiar. The monster has powers that are completely uncharacteristic for its race. The boss has access to technology that he wasn't expected to. Don't use the same plot twists until they become predictable, but you should definitely give the players the impression that if they use all their powers to skip to the end, they'll find out that "the end" was just a red herring.