Mr. Brock, I would go one step further than what your question suggests, which is to say that where possible, we should be off-ramping those individuals from the criminal justice system at the earliest point in the system.
As you yourself underlined, in a lot of those cases the determinants that have led to their intersection with the criminal justice system are based on a lack of access to safe or affordable housing, education, health care, etc. Off-ramping them, the earlier the better, lets us focus on violent offenders.