Obviously, there is no such federal law on the books because it is still legal and happens in many states. But the prison system seems to have decided that hard labor isn't effective.
Considering how the civil rights crowd complains about even the paid labor prisoners do it doesn't surprise me...