It's all very well to have the death trap. After all, it's a stock trope of heroic fiction. Make it deadly, and dangerous, and seemingly impossible to escape. By all means, thwart the first, second, even the third attempt by the heroes to get out alive.
But you have to remember that the other part of the trope is that the heroes always manage to escape. You don't need to provide an explicit means to escape. Just let the players come up with wacky plans themselves. They'll get a greater feeling of satisfaction if they come up with a means of escape themselves.
For this reason, it's better to use death traps that allow the PCs to at least move around a bit. Strapping them to a slab that is about to get bisected by a laser really only leaves them with Fast Talk as a means to escape. (Unless they have magic, or the modern-day equivalent, the magnetic buzz-saw detonator phone explosive wristwatch, which the villain stupidly left on their wrist.) Better to stick them in a room that is flooding with water, or in a plane without a pilot or something.
Or a plane without a pilot, that is flooding with water. We'll leave you to figure out how to do that one.
GM: All your attempts to stop the composter fail.
C-3PO: They're dying, Artoo! Curse your metal body! You weren't fast enough. It's all your fault!
R2-D2: Nooo! I can do this!
Han: Fix that wall bracing at 25 degrees!
Han: Chewie, you need an auxiliary L-beam to distribute the peak load.
Han: No, no! No! This one goes there, that one goes there. Right?
Han: Luke, shore up those cross struts!
Han: Right, if my calculations are correct, that should hold a load bearing of around 600 kilonewtons.
Leia: Is that a lot? That totally sounds like a lot.
Han: What's the operating force of this composter?
GM: The composter grinds to a halt.
R2-D2: Yes!! In your face, Peace Moon!
Leia: Don't you dare take the credit.
R2-D2: Who cares? Either way, metal saves the day.