I recall my father, who worked for the Texas Pacific and DRG (Denver and Rio Grand Western) and traveled all over the country, sometimes using employee passes and sometimes hopping boxcars back in the '20's. He toured the country from Jacksonville to Bangor, NYC to Seattle, Seattle to San Diego and back to Dallas, and eventually ended up in Kansas City in 1925. He took a Missouri Pacific freight from Ft Worth. They paid him ten dollars and gave him a free ride to keep a boxcar full of cattle content, playing his ukelele and singing to them.
I have also seen the film called La Bestia, which describes the ride from the Usumacinta to the Rio Grande atop a boxcar, and it is far worse than anything my father told me.
The main danger was the railroad "bulls" rentacops with nightsticks. But he knew how to avoid them, because some hobo told him the secrets of how to do this. One trick involved using a wooden fake lock to make it appear that an empty boxcar was loaded and sealed. after changing the paper manifesto.
It is probably a good thing for the US that the Mexicans are trying to stop the flow of people on La Bestia. Mexico is a lot wealthier a country than Guatemala, Honduras or Salvador, and safer as well.