Banning private prisons is one way
See the kids for cash as an example. Prisons should not have a profit motive frankly. Too many perverse incentives.
Aside from that I think there is an overall problem where the prison system is designed to be a waste bin for so many disparate problem people...