

Thanks for asking! So a lot of laws are bullshit, like sex worker laws and drug laws, can be thrown out at least locking people up for posession and instead help them get help for addiction if they are or if not leave them alone, or using the services of sex workers (or just merely sex workers existing. Sex work is work). A lot of laws around immigration etc are too, so you know.
The only laws then that really matter are stealing stuff and harming others.
The first problem can be solved by giving people what they need to live in most cases. Harm is harder but it could be solved by having more community, talking about these things more often and restorative and transformative justice.
If, however, there are people who for whatever reason cannot stop harming others then yes, there should be something analagous to ‘prisons’ but with the focus being not on mistreating them, profit etc but with actually improving their lives. I believe some countries in Europe follow this model and it works better than the frankly fucked up ones that exist in most places.
This is why both should be turned off when not explicitly in use.