Agreed. I will add that we’ve come full circle on psychiatric hospitals, which is essentially what you’re describing in different words. Budget cuts and deinstitutionalization meant many of those were closed down 50 years ago.
In no small part because psychiatric hospitals were wildly, wildly abused. Basically you could lock people up indefinitely with no conviction of anything because someone said they’re a danger to themselves/society/whatever. Basically used like an on-shore Guantanamo.