No, the concern with slavery is the lack of agency for oneself at the behest of another. A slave has no say in how their body is used and it's a violation of the human rights to be your own person. Whether or not they are guilty of a crime is irrelevant.
Punishment for a crime does not mean permitting abuse. It means rehabilitation or isolation from others. They can still be their own person and aren't forced into labor, but are not allowed to be a part of society again.
My ideal would be a region, probably an island like Pit Cairn, that is remote where the violent can live in a police state built around the idea of rehabilitation through building routines. A prison building is inhumane, especially how it is used in the US, but an open community of folks who are rejected from society as a whole would go along way to solving the punishment problem. Folks need to live as they do in society but removed from temptation - given the coaching they need to succeed when their sentence is served.
For violent and dangerous people who resist rehab, they get to live alone under the watchful eye of drone surveillance, with reaction teams to correct any escape behavior. Being kind takes extra effort, but the results are only available through kindness. Strict authoritarian behavior, like how the US prison system works, will make those individuals resist treatment and rehabilitation.