I’m not entirely against the idea of prisoners working on things - the question is, who benefits?
If exclusively the prisoners benefit and the state/corporations only benefit from a resulting reduction in crime, then it does not encourage high levels of incarceration.
If corporations or the state legislators benefit, it encourages high levels of not only emotionally-punishing but also counter-productive imprisonment that harm not only inmates, but also most everyone else who isn’t a crony.
Or at least have them training rescue dogs or repairing fire-fighting equipment or something that is more like a charitable social good.
I mean, if we had prisoners farming vegetables that were only served to the prisoners at the prison, I don’t know if it would reduce recidivism, but no one would be giving kickbacks for it!