I have no experience, so I don't know if this would be viable, but it just might work. First edit skills, so praying would be possible from 10 piety, not 0. Then just manually edit the piety of a character you want in jail to be below 10.
This would also require editing the scripts to give starting chars at least 10 piety.
Maybe when they enter an area (the jail) you could impose the sit skill on them with a custom time on the cooldown. So when they walk into the jail their character sits down and the cooldown for sit would be set to 2 mins (temp) Let me know if you get it working it would be a cool feature
Or you could edit their binding point and set it to the geo location of the jail... so if they pray they will just respawn inside the walls of the gate...
Don't know if that is possible... would be cool tho...