Great, let's see how big the battery would have to be.
First, let's look at the motors in freight diesel-electric motors.
Take the EMD SD70 as an example. Initially 4000 HP and 3000 KW powerplants that grew fairly quickly up to 4500 HP and 3200 KW. That's the equivalent of 3.2 MW.
To run that locomotive at full power for just an hour, you will need a 3.2 million watt-hour battery cell, and as many cells needed for your desired voltage.
Gee makes a 1 MWhr lithium ion battery that is transportable.
https://geebattery.com/battery/1mw-l...storage-system
Rated Continuous Output is 0.645MW for a duration of less than 2 hours.
That's about one fifth of what is needed to match the diesel-electric locomotive at full power.
Of course, that was assuming the diesel locomotive was providing full power all the time, which of course it does not.
All of the equipment is assembled in a standard 20-foot container, include fire services, smoke alarm, grounding-products and heat management system. Do not confuse storage capacity with output capability. We will need 5 of these units vs 3, and we might have to set the battery aside and pick up a new one every hour.
You might see battery power locomotives in switchers near major rail yards where the train speed is around 10-20 mph maximum. But I believe we will not see them on long distance freight hauls for a long. long time.
Additionally, GE makes a 30 MW lithium ion battery, but it is for stationary sites.
Prices for everything is not stated on any of their web sites. But I bet they are not cheap.