Players always think they're going to win the adventure. The bad guys will be defeated, the monsters will be slain, the princess rescued, the treasure claimed. That's what they're there for!
The GM's job is to make that possible. Difficult, yes, requiring courage and daring and a dash of luck, certainly, but possible. In some ways this causes the exact opposite problem to what happens if you throw them into an inescapable deathtrap. You actually should be trying to make your deathtraps escapable for the PCs. And in case they miss one of the clues on how they can circumvent the trap, you can provide a backup escape route. And just in case they also miss that one, you can leave a big hint about a third possible way to avoid being killed horribly.
Guaranteed, if you make the trap completely inescapable, they'll come up with a dozen different ways to get out of it. If you provide three different ways to avoid or escape the trap, they'll miss them all and quite possibly end up having to create new characters.
Transcript
GM: Don't look at me. I don't have any.
{beats of everyone looking at one another}
Chewbacca: Okay, okay, I'll go buy ice cream!
Han: I'll go with you. We're not in this battle anyway.
C-3PO: Hokey pokey, please!
Han: Yeah, we'll get the good stuff. It'll be a celebration when we win the adventure.
R2-D2: And level up a plurality of times.
GM: Cart before the space-horse, don't you think?
Han: Back in ten minutes. Try not to blow up the Moon until we get back.
Luke: So you're going to help after all?
Chewbacca: No, we just want to witness it.
GM: I know what you're thinking, but I've outlawed the use of any pyrotechnics in Pete's dice. And so have the police.
Han: Awww.