> For the purpose of this article the term "forced or compulsory labour" shall not include: (a) any work required to be done in the ordinary course of detention imposed according to the provisions of Article 5 of this Convention or during conditional release from such detention; (b) any service of a military character or, in case of conscientious objectors in countries where they are recognised, service exacted instead of compulsory military service; (c) any service exacted in case of an emergency or calamity threatening the life or well being of the community; (d) any work or service which forms part of normal civic obligations.
https://fra.europa.eu/en/eu-charter/article/5-prohibition-sl...
See earlier 1953 European Convention on Human Rights (ECHR) Article 4 at https://en.wikisource.org/wiki/European_Convention_for_the_P...
It's not exactly surprising to see an exemption carved out for it in European documents.
but where that goes wrong is when prisoners are working for private interests for slave wages (i.e., food and shelter) and the difference being pocketed by said private interest rather than going to pay for said incarceration.
> Neither slavery nor involuntary servitude, except as a punishment for crime whereof the party shall have been duly convicted, shall exist within the United States, or any place subject to their jurisdiction.
https://constitution.congress.gov/constitution/amendment-13/