https://www.bbc.com/news/world-us-canada-42421417
From the wikipedia article on Positive Train Control (PTC):
>In December 2010, the U.S. Government Accountability Office (GAO) reported that Amtrak and the major Class I railroads have taken steps to install PTC systems under the law, but commuter rail operators were not on track for the 2015 deadline.[14] As of June 2015, only seven commuter systems (29 percent of those represented by APTA) were expecting to make the deadline. Several factors have delayed implementation, including the need to obtain funding (which was not provided by Congress); the time it has taken to design, test, make interoperable, and manufacture the technology; and the need to obtain radio spectrum along the entire rail network, which involves FCC permission and in some cases negotiating with an existing owner for purchase or lease.[15]
https://en.wikipedia.org/wiki/Positive_train_control
So needless to say... the technology likely exists today, but implementing anything significant to existing infrastructure in the US is a monumental feat.
The above example is just a safety system, but once you start removing employees you also start running up against labor unions... which is yet another layer holding things back.
However, the nationwide freight network is interconnected by many different companies, in various states of repair, with various states of mechanization. I live near a bunch of grain processors and when they are taking deliveries it is a lot of manual switching and back and forth to get each plant's cars to the right lines.
Could it be automated? Yes, the technology is available, you 'just' have to implement it. Will it be? Probably not anytime soon.