Inevitably, brave rebels or notorious scum will be captured and taken to a proper Imperial prison with pill lights and hissing hydraulic doors. Because this is Space Opera, they're going to get out somehow. It's inevitable. But what will give them the chance?
Fed up with the lack of guardrails, the pointless torments, and the terrible food, the prisoners have rioted! The prison is in chaos. Doors are flung open, the lights flicker, fires break out, and smoke fills the air. The party has an excellent chance to escape, provided the legions of stormtroopers closing in don't catch them first, and provided they don't have enemies on the inside waiting to settle old scores. The Imperials aren't the only danger here.
Before their (well deserved) execution, a ranking Imperial officer decides to lecture the party about their many faults and failures while pacing back and forth. The lecture is so long and so dull that even his stormtrooper guards begin to lose focus. Can the party goad the officer into making a tactical blunder, or will they simply bludgeon their way to freedom?
3. Malfunctioning Droid
The sleek black torture droid glides into the room, flanked by two stormtroopers. Its ominous flanges and needles glisten in the dim light of your cell. Suddenly it stops and begins to sputter quietly. A thin stream of smoke emerges from one of the panels. The Imperial officer stops gloating and stares at it, annoyed. "Not again. You," he says, pointing to one of the stormtroopers, "get a technician, now!" Can the party use this distraction to their advantage? The remaining stormtrooper and the officer will clearly be focused on the malfunctioning droid.
Someone the PCs helped in the past, or a generic Rebel team, decides to break them out of prison. Their plan has a 50% chance of being laughably unworkable.
5. Unpleasant Rescue
Someone wants the PCs more than the Empire does. Maybe they can't work off their debts if they're dead. Maybe they want to execute the PCs in a convoluted and gruesome way. Maybe the Rebellion has a suicide mission planned that only the party could perform.
6. Crime You Didn't Commit
The party is brought before an Imperial military court (3 officers, a few stormtroopers, and a protocol droid) and informed that they are guilty of an extremely minor offense, such as littering. The names announced (at the end of the trial) don't match the PCs names at all, but nobody will realize this unless it's pointed out. While this means the party will go free after paying a hefty fine, some poor souls are probably going to be executed for the party's crimes.
7. Much Worse Crime You Didn't Commit
The party is brought before an Imperial military court and informed that they are guilty of a ludicrously severe offense, such as sabotaging a Star Destroyer, attempted assassination of the Emperor, or, if those crimes aren't severe enough, a string of unlikely and implausible events the PCs had no part in. The sentence is death - gruesome, convoluted death. Can the PCs prove their innocence? Can they prove that the lead Imperial prosecutor is blaming all the local Rebel crimes on them to make his numbers look good?
8. Completely Obsessed by a Trivial Crime
The party is brought before an Imperial military court. The lead prosecutor, who has clearly been waiting for this moment for a very long time, presents bombastic proof that the party committed some minor crime (vandalism, car theft, stealing rations) on his watch a long time ago. He has holograms and charts and everything. The other two Imperial officers gently take him into an adjacent room once he's done, presumably to inform him that "death by microlaser ablation from the feet up" is not an appropriate punishment, and that the party is also guilty of much more severe crimes. This, or baiting the obsessed officer into a tactical error, might give the party a chance to escape.
9. Mutual Backscratching
A ranking Imperial officer has a mission only the party could carry out. It's a major breach of protocol, but if they help her. 1. assassinate or frame a rival, 2. betray an unaffiliated Rebel cell, 3. infiltrate a secure facility or, 4. pay a truly enormous bribe, she might let them "escape" from Imperial custody. There is a 50% chance she won't alter the deal once the PCs succeed.
10. Shoddy Construction
The entire prison is under construction, in a state of terrible repair, or brand new but badly built. Sitting on anything or kicking the walls causes a panel to pop off. Escaping the cell is trivial, but can the PCs survive in the industrial bowels of an Imperial prison?