I'm aware that some democratic countries, including the US and Japan allow forced prison labor, meaning that refusal to work in prison is punishable e.g. by solitary confinement (or a "chill box"). As there seems to be some confusion what this means, in the US for example
the courts have held that inmates may be required to work and are not protected by the constitutional prohibition against involuntary servitude. Correctional standards promulgated by the American Correctional Association provide that sentenced inmates, who are generally housed in maximum, medium, or minimum security prisons, be required to work and be paid for that work. Some states require, as with Arizona, all able-bodied inmates to work. From 2010 to 2015 and again in 2016 and 2018, some prisoners in the US refused to work, protesting for better pay, better conditions and for the end of forced labor. Strike leaders have been punished with indefinite solitary confinement.
And in Japan
most crimes are punished by “imprisonment with labour" [...]
“Handbook for Life in Prison" of the Fuchu Prison in Tokyo states as follows:
“The most important part of your sentence is that you fulfill your duty of assigned labour. Prisoners who are sentenced to imprisonment with labour are obliged under the law to engage in the work to which they are assigned. If without good reason a prisoner refuses to work, skips work or demands to change the type of work, it will be considered as an action against that duty and severe measures may be taken."
So I'm not talking merely about voluntary prison labor, even though this may be incentivized in some way, e.g. being seen favorably by parole boards, or even conferring concrete privileges while in prison etc. (Such as is the case in the UK, for example).
Are there any EU countries that allow a similar forced prison labor practice? If not, is it because of some CJEU or ECHR decision? Or some treaty provision?