I like the idea of Allen Gould however creepers dont engage (and explode) if they cant see the player. If you want to use the selfrepairing piston wall i suggest tnt strapped to a lever or pressureplate. This however still requires you to recharge the tnt.
IF you have access to the /give command and you dont have command blocks disabled you could let command blocks replace the tnt (or simply remove the door for a few seconds before replacing it).
For an actual escape track through the prison, my idea would be to make it parkour like. If you want to make it challenging (and invest a lot of time into this) you could make a speedrun track that if you dont run fast enough (or fail one of the jumps) you can push a button which teleports you back to your prison. This makes it very challenging for the prisoners and extremely frustrating. The buttons once again being hooked up to command blocks. This track will definitely make them think about what they've done wrong.