Criminals need to be isolated from peaceful society anyway, and if we’re going to the expense of warehousing them, the least we can expect is for them to contribute something back. The ethical justification for prison labor is obvious and the analogy to heritable chattel slavery is ludicrous.
You don’t really want perverse incentives, like that example where American judges were given kickbacks to imprison kids, so they found innocent kids guilty.
I think when money is involved that sort of stuff is much more likely.