Absolutely. But the goal needs to be reform. We have some idea of how to approach it (Cognitive Behavioral Therapy, mandatory real time drug and alcohol monitoring, psychotropics such as antipsychotics, employable skillsets, stable housing, stable income, anger management, etc.)
We don't entirely know what to do yet, but I bet we could get a lot better at reform if that's where we focused our efforts, rather than attributing all crime to moral failing.