The Geneva Convention (III) Relative to the Treatment of Prisoners of War 1949 still allows for other ranks to be employed on manual labour, so long as it is not dangerous, such as clearing mines, or helpful to war effort, such as making munitions. Officers, on the other hand, may not be used as labour and spend their time digging escape tunnels and vaulting over wooden horses:-)
Interestingly it was the treatment of PWs generally during the American Civil War and the public outcry associated with the conditions in which Union prisoners were held at Andersonville, that led to world-wide concerns and eventually the Geneva Convention on treatment of prisoners-of-war.
The Andersonville connection is through Clara Barton who was sent to there to identify and mark the graves of Union soldiers and was instrumental in obtaining US government recognition of the International Red Cross which she founded in the US in 1881. The International Red Cross had been established 1864 to alleviate the suffering of wounded, following the experience of Solferino during the 1859 Franco-Austrian War.
She also campaigned for US ratification of the 1st Geneva Convention, also of 1864, designed to give protection to wounded under international law, which the United States ratified in 1882.