The first is a deterrence. This is quite a yes/no thing however. Longer sentences, or worse conditions don't increase its effect.
Second is re-education. This is where most effort should be focused. You need to simultaneously break the bad habits causing issues, and implant good ones (in the form of skills, and improved social situations). The aim is to make them a productive member of society again.
Last is containment. Some people either cannot or will not function safely in society. These people either need to be contained indefinitely, or killed. Given the unreliability of the justice system, the latter is a dangerous route to walk, and often more expensive.
I'm personally of the view that we should all have free (tax funded), access to retraining courses and resources, along with physical, mental, and social health systems. Prison should mostly be focused on the enforced use of these. They are contained while they retrain and get the help they need. They are then released in a better state than they went in. It's the most cost efficient option. The Scandinavian countries already use something similar (for convicts), and it seems highly effective.
I can see where you are coming from but heck, after a criminal is caught, it's not in state's interest to punish him except for making an example out of him so other people won't think of committing the crime.
Deterence is not a great strategy for preventing crime. Criminals don't actually do much cost benefit analysis before committing a crime; they will consider the chances they have of getting caught, but not the severity of the punishment. Rehabilitation programs are worth considering over punitive justice so long as they are more effective at preventing recidivism, which is certainly an interest for a state.
I do sympathise with that argument but I would argue that loss of freedom is a powerful disincentive. For some crimes disincentive's don't work anyway. If the goal is smaller recidivism rates I reckon you'd get better results treating them well as opposed to poorly. If you don't treat them like people you can't expect them to act like people.
I guess alot of the stuff we already do e.g Community service, mandatory classes, bans, fines but I would add dissolution of your company if you own one or confiscation of luxury items such as yachts of private jets if you own them. Ultimately I think its a case by case thing like shoplifting for essentials should go unpunished but people making lots of money shoplifting high value items should be compelled to pay it back