A system that prevents rapes, gang fights and drug dealing while providing education and therapy would be hugely labor intensive, and would consume a huge proportion of people of very high moral character available in society, if there was a way to reliably identify them, if you had an incentive for them to want to do this. It would explode the costs of staffing prisons by whole number factors, when the existing system costs more than states can afford. Most of that increase would go for your first three criteria -- stopping rapes, gang violence and drug trafficking.
And it would be of limited utility, even at that. There is no way it would pay for itself by rehabilitating so many more prisoners that their lack of recidivism and productivity in society would offset these increased costs. The current system has opportunities for rehabilitative services and education for those with an interest who are willing to buy in to the "straight world" paradigm. There might be some benefit to expanding those opportunities so they could reach more people, but it's really hard to say if that would prove cost-effective.
I see this a little different than most folks. I work with kids in the foster care system -- the toughest kids in the system, including sex offenders. Some of these kids have done time in kid-jail and kid-prison. Some of them have parents and family members who have done prison time. A frustrating number of them are almost certain to spend a decade or more of their adult lives in prison, because they're so abysmally unprepared to live in the straight world. And there's no tidy obvious solution to this. As much as the SOs get the societal hate, it's much more difficult working with BRS (Behavioral Rehabilitation Services), especially with adolescents. Many of these kids were born with developmental problems due to fetal exposure to alcohol, and there is no cure for that. They have full sized bodies, and may have intellectual ages approaching their physical ages (usually, not), but have the emotional control and self-discipline of someone half their physical ages (or less). Those who don't come from severely broken homes run by incompetent (at best) or abusive parents have deep mental and emotional problems that may respond to competent treatment, but don't go away ever. Many of them are aggressive and violent simply because it helps them avoid having to deal with those emotional issues, and because it helps them feel like they have a little power in a world that overwhelms them. No amount of treatment or education will enable a significant portion of them to be able to live independently, and there is no way in Hell they will ever be productive enough to cover the living cost of a normal person who doesn't need the services they will consume -- not a few of them are in this boat before they take their first breath. It's damn unfair and frustrating to look at every day, which combines with inadequate pay (even in a system so expensive we have to cut the costs to provide any help at all) to result in massive burn-out and turn-over in my field.
I get to see these kids bounce off the criminal justice system time and time again with nothing more than a wrist-slap until they've compiled a serious history of violence and a belief that the system will do nothing to them no matter what, which prevents them from learning how to cope with disappointment and frustration in constructive ways, because they can destroy things and assault people without losing anything they care about. When they become legal adults, and don't have the child welfare system in place to protect them and provide for them, and don't have the capability of finding and keeping a job that will give them a fraction of the lifestyle they've gotten used to, there is no real chance for them to survive outside of prison.
I think there is a portion of criminals for which these kinds of alternatives could be useful for -- not the people who are currently being sent to prison, but the kinds of people who are simply being released because there isn't room for them in prison. Work-release kinds of things. Those are fine for people developmentally, emotionally, dispositionally and educationally prepared to be gainfully employed. But most of the people in the prison system are not thus prepared to function in society (including my nephew, who will soon be beginning his second prison sentence shortly). Some of them will be willing to participate in drug treatment, vocational training, and psychiatric treatment to help them become thus prepared, but those are very, very hard things to do (talk with a recovering alcoholic/addict some time), and it's just easier to take a path of lower resistance and stay in the prison world instead.
It's obvious the system is broken. Broken badly. I think the rehabilitation/reform model developed during the Progressive Era has been proven an abject failure. Unfortunately, no workable alternative model has presented itself. Too many people aren't willing or able to work for their own support, or to follow rules that guarantee their safety and the safety of their communities. TFA doesn't present a system which could deal with enough prison-bound people to be interesting. This line of reasoning should be pursued, so that, some day, perhaps the tech will combine with some potential break-throughs and new models that could work better. It's not a bad effort. It just isn't ready to be what the author wants it to be.