From interviewing people in prison, who were convicted (pleaded guilty) in connection with the Broadwater Farm riots in 1985, I can say that many young blacks, not all, were totally unaffected by being locked up.
If my impression was correct, that means the threat of prison is not a deterrent and officialdom must look for other solutions.
Thats only because prisons are relatively soft these days.
If prisons were 'Bangkok Hiltons' and enforced hard labour and good old fashioned beatings were common place I think they would be viewed differently