As someone who worked with RR unions for a couple of years a while back and has a buddy in BIG RR here is my both sides take
ANTI UNION - These RR union workers are making 100k+ (this was like 6 years ago) without a college degree with a sweet sweet RR pension that is better than social security. They know what they signed up for and they did it because it was by far the best option after they got out of the military or their dad/uncle/cousin got them job.
PRO UNION - RR's are basically a Duopoly (BNSF/UP west of the Mississippi, NS/CSX east) and are printing money left and right because they have no competition besides OTR trucking. RR's are trying to reduce the minimum crew count on trains from 2 to 1 via (ATC
https://en.wikipedia.org/wiki/Automatic_train_control) to make even more money for their Duopoly while cutting out the people who actually run the trains.
After deregulation in the 80's BIG RR consolidated and was content to rake in their guaranteed profits due to their duopoly and share some of that with labor. Over the last couple of years BIG RR has been turning the screws HARD on both unions and their management to make more money even though they are making record profits. My buddy was a non union Regional Manager for BIG RR and even he left because it was getting so ridiculous....he went to a RR contractor for a year but recently went back to BIG RR because the money was too good.
What is the answer here? Dunno, its not like you can decide to create a new RR to compete with the big guys that got trackage rights in 1880. RR's are the most efficient way to transport goods between major transit hubs besides boats.
The only thing that will knock off RR's dominant Duopoly position is OTR trucks without a driver which has been 5 years away for about 10 years now.