One way to ensure that prisoners stay put is that if they go outside of prison, they could--legally--be shot on sight. Or just whipped. Or have certain levels of mutilation imposed on them
Prisoners sentences could be different levels and they get somehow tagged. I suggest with nanotechnology that shows up on scanners, that are put into smartphones
That way, prisoners can leave prison voluntarily, but they take their chances, and they have the option of moving far far away, with maybe a demarcation line that if they pass it, they are far enough from everyone that they are effectively "Wildlife" and therefore cannot be legally hunted (not to say they won't be)
But within the bounds of civil society, if the nanotechnology says they are a serial or mass murderer (>2 people or >3 people respectively), or if they commit serious sex crimes against children, then they are sentenced to "Kill on sight"--anyone can kill them on sight within a society zone
This would ensure that pretty much no one is going to take their chances leaving prison, unless they just don't care if they die
Someone who is a rapist can be 1) themselves raped, 2) beaten up, 3) detained and whipped (break skin) for no more than 20 times total within a 12 month period, regardless of number of assailants. 4) detained without permission for no longer than a week and deprived of food for no longer than 5 days, etc
You can get creative with the laws
Someone who breaks laws of violence against others more than 5 times can be detained have have one of their hands removed; after 7 times, one of their eyes, after 10 times, both of their eyes, after 15 times, they are authorized to be detained and burned publicly
Such a system would reduce crime to near 0, especially if everyone (i mean everyone) carried a lethal weapon or a weapon strong enough to be lethal if used repeatedly
I personally prefer we carry swords, that have a switch that electrifies them. But that's because I'm a nerd
Yeah, but let's make sure we tag people with their political beliefs and sexual orientation so we know that we're only hunting the people that we really, REALLY hate!
....
Get the fuck outta here with that shit.