> Most criminologists will tell you that punishment is a very poor method of reducing the crime rate
Again, this is not anything written in stone. For example, consensus in criminology is that the certainty of punishment is a strong deterrent even when the severity of punishment is not, so the detail of the punishment matters.
And because criminality follows such a strong power law distribution, where a single-digit percent of people are responsible for over half of the crime, it is trivially easy to see that by permanently incapacitating that single-digit percent, you can actually lower the crime rate a lot. El Salvador's homicide rate dropped to 1/100th in ten years by doing precisely this.
To the degree that criminologists say that "punishment is a very poor method of reducing the crime rate", what they really mean is that in the context of today's liberal western democracy, there isn't punishment that will adequately prevent an offender from reoffending while remaining palatable to discuss in polite company. Popular opinion does appear to be shifting on this as we speak.
> the underlying desperation and inequality that drives people towards crime
From what I've seen, smart, empathetic people such as yourself are actually really, really bad at modeling the minds and motivations of petty criminals and others in the bottom of the distribution of cognitive capacity who engage in antisocial behavior. It seems to be such an enduring blind spot for many people on the opposite end.
The vast majority of people who commit crime are not Jean Valjean or Aladdin. They smash a windshield that costs $800 to replace for fifty cents in loose change, they assault people to look tough to a girl, they vandalize just for fun. They only steal from stores things they can fence for money, not bread and milk and diapers. Sometimes they'll put in surprising amounts of effort into committing crime; effort that could really have gone into a productive endeavor. There's precious little desperation involved. It's mostly just what feels good to them in the moment.
The vast majority don't need "help", and in fact no one has figured out a way to help these people out of doing what they do. At best you can provide what I would euphemistically describe as palliative care, at great taxpayer expense, to people who would go back to doing what they were doing the moment that help stops.
One caveat: your username suggests that you might be from a homogeneous population with smaller tails on both ends of the distribution, so it's likely that your experience is different than mine, and that you encounter more Jean Valjeans and Aladdins than is the norm around the world. But I would caution that if you can't envision a person who does bad things not out of any articulable reason but just because, as opposed to "like you or I but under worse circumstances", then that is a failure of your imagination.