And you would be okay with that? You're advocating for actual slavery of inmates?
A free has has to eat, because of the nature of the universe, but he is free. He can choose his job, has recourses with his employers, etc.
Your statement implies that it's the government which gives everyone the deal "work or starve", but that's simply not the case. The free man is simply existing in the world, surviving as he sees fit. By taking away his capability to survive on his own, you have the ethical responsibility to feed him.
These ideas are preposterous by modern standards, but people can and have come up with arrangements where a person works from jail without becoming a slave.
Can a 'free man' survive 'however he sees fit'?
You can't even walk around 'freely', some guy in Uk was trying to cross the country naked and spent 2 years in prison.
Build a house in the woods, plow the land, hunt without a license, and someone will show up to deal with you. Sing a song in the street? You are breaking copyright and some public nuisance or antisocial behaviour laws. You built something with your own hands and sold it? Might have broken some patents.
About the only thing a free man may do is work for a man freer than him. I appreciate we have a civilised society, but compared to free day of olde, it's a total straigh jacket.
So no, these situations are not equivalent but they are comparable enough that I don't buy the categorical moral judgement you are casting.
Calling the unemployed lazy is a lie untill you offered them a job and they refused.