We start by taking these hundreds of thousands of people who really shouldn't be in jail or prison at all and ask, "what programs would help them from not doing this again? What's the root cause we can address?" And we start implementing social programs that will help support, educate, and reform folks.
Some combination of:
1) Remove a lot of drug crimes from the books and clear convictions. Many of these shouldn't be punishable at all.
2) invest in housing, food, and mental health support to catch folks before they turn to low level theft. Give them to people convicted as well. If you change their situations, many will never need to commit crimes again.
3) Levy fines, garnish wages while providing support. Restrict movement if needed by requiring folks stay in contact with a parole officer or mental health support professional.
Etc
Most "criminals" are folks who are in positions where we left them few choices as a society.