A train wagon easily weights 20 tonnes and more. If it goes just at 50 kph, it has an impulse of 278.000 kg*m/s. Respectively 278.000 Ns. According to some googling human bones tend to break at around a force of 4.000 N.
Realistically the train is just going to flatten whatever flesh and bones are between the wheel and tracks.
I'm perfectly fine with them being garbage humans in the confinement of a prison, where people who commit, support or entice genocide belong.