I'm not sure if you were were referring to a specific locomotives when you said "those locomotives," but some locomotives have toilets.
I laugh when I see movies where they are in a boxcar and carrying on a conversation. It is so loud in an empty boxcar that there is no way you can carry on a conversation with anyone. As a matter of fact it is so loud you could scream at the top of your lungs and not hear yourself.
The cabooses have gone by the wayside.
Read the article below the picture. It's about as comprehensive of a report as I have read about what was going on on the rails in the 1990's.
Great report Mickey; thank you very much. After reading that and the replies, I'd say hopping a freight train has moved way down on my bucket list.