Its a fair point but its probably not practical.
I don't think there's enough jobs in prisons that need physical labour where they can cover the costs. You would then have to train them in useful skills but incompetence is not a crime so you cannot penalize those who "cannot learn/do" skilled work.
Other alternative is to make them work the same job they did outside but that is a slippery slope with lot of potential for abuse.