This is also the justification for the original Holocaust.
Some concentration camps are set up initially as slave labour Factory as the belt tighten on the nazi economy they streamlined the process by transforming them into extermination camps. In the eastern front, the Slavs are put to work and their calorie intake were calculated to see when it is profitable to stop feeding them and just kill them.
Adam Tooze's wage of destruction goes in detail on that