Last night I played the last encounter of the Pathfinder campaign I have been involved in for almost a year. I really enjoyed my time playing with the group and had a grand time with the game but I felt pretty let down by the grand finale. The final session was going to be pretty much exclusively a final battle with a lich that our party had been battling indirectly for so long but it didn't work out very well. The trouble was that the lich in question should have handily mopped the floor with us and completed her takeover of the world; the only reason we won is because the DM very deliberately played her like a dunce. I don't mind some characters doing things stupidly because being powerful in combat is no guarantee of being a master strategist but this opponent in particular was ancient and had absolutely massive Intelligence and Wisdom scores as well as plenty of time to prepare.
The fight should have gone something like this: Lich teleports next to our group with Improved Invisibility on while we are asleep. Lich leads off the surprise round with a Maximized Fireball while its undead dragon friend starts munching on us. Lich hucks another Maximized Fireball and a Quickened Fireball next round and the dragon continues to munch. This probably kills 3 characters, likely before all of them have even gotten a turn. There is no reason to think that more than 1 of us would be alive by round 3 and that remaining character would be utterly certain to die by the end of round 3. Instead the dragon attacked us by itself until we killed it and then the lich spent most of her time casting spells that would inconvenience us instead of ones that would flat out kill us. Note that no advanced strategy is required here; surprising us and then casting Fireballs while invisible was more than enough to guarantee victory. Advanced strategy includes things like having the dragon hover over our heads with Fly and have an active Silence spell on it so that it could utterly negate all of our party's spellcasting - letting me loose with a high level spellcaster is a dangerous thing. :)
The biggest issue was the omniscience of our enemy. The lich could scry on us from far away and teleport onto us any time she wished. This guaranteed that the fight would take place where and when she wanted it to and that advantage is insurmountable. She could wait until some of us walked a few hundred meters away to go to a shop, talk to a friend or do anything else and immediately teleport onto the smaller group and handily annihilate them. She could attack us in our sleep or while we were fighting something else if she wanted to and we had no recourse. Simply put there was no practical way for us to survive the encounter. The galling thing was that the lich could have done this to us for a large part of the campaign; she was aware of us for some time and had every reason to wipe us out earlier but chose not to for some reason. Knowing that the lich *should* have wiped us out a thousand times but didn't just because otherwise the campaign would end makes much of what we did feel pointless.
Having overly powerful enemies that could easily smash the main characters is a real problem in many games. In the Mass Effect series it was the critical problem with the game that created endless plot holes and the excessively Deus Ex Machina ending (the new endings are released now and they are drastically better). In ME it was always very strange to think that a person who is good at shooting people with a rifle would somehow matter in a battle against gigantic invincible alien spaceships and in the end that was unrecoverable - Bioware resorted to "ummmm, I guess you win by Magic, yeah....".
For the story to feel satisfying players do want to face superior enemies but the superiority needs to be limited. It is very tempting to create a super awesome invincible bad guy and find a clever way for the heroes to defeat them but it usually becomes massively problematic that the bad guy doesn't just flat out *win* right away. It is fun to outsmart clever but overconfident people but it isn't fun for the players to conclude that they only have a chance because their opponent is a moron.