According to [1] there's fewer than 2,300 railroad police officers in North America now (under 1,000 in the US) compared to 9,000 in the mid-1940s. How much of that is the switch to cars and how much is reduction in work force is unclear but today's number does include the East coast Amtrak security which sees a ton of ridership and there is much more freight these days.
Let's say the railroad hired the right people - the cost of litigation from injuries and death means that the people they hire have little incentive to intervene. I see this as akin to store shrinkage and security that can't touch a perpetrator - it's accepted by rail shippers as a cost of doing business.
It doesn't seem like they hire enough people.
[1] https://www.therailroadpolice.com/history