Let me guess, you don't own a BEV. You don't drive them with the same mindset as an ICEV (where you only fill it when the tank gets close to empty). With BEVs, you quickly plug it in whenever you can (if needed) while doing other things (one of the best things about BEVs is it saves you time, since you never have to waste time going to a gas station).
Trains are even easier to manage, since it is much easier to charge while it is moving than it is with a car (yes they are working on induction chargers for highways, but they would be incredibly expensive to install and not really necessary). By putting catenary at and near every station (where they likely already have access to power) and maybe sidings, you can not only charge the batteries in the places the train is spending the most time over the shortest distance (minimizing installation and maintenance costs), but you can power the wheels directly when the motors need the most power (when accelerating up to speed from a stop). Once the train is up to speed, you only need enough battery power (with some reserve) to maintain the speed until the train gets to the next stop (you don't need to fully recharge the battery every time). The batteries will also get some charge from regenerative breaking. The only time the train will likely have a full charge is when it leaves the shed in the morning, after charging all night. The battery will do a zig zag decay throughout the day before charging back up to full again. You just need to make sure there is enough reserve to cover eventualities.
Remember, we are talking corridor trains here, not long distance trains, which would need a completely different solution.
True, but there is even more to it than that. It is kind of like Tesla's million mile battery in that one way to increase the life (in distance traveled) of the battery, is to increase the capacity of the battery (each cell is rated for a certain number of charge/discharge cycles, and if you increase the battery's overall capacity, you reduce the number of times each cell needs to be charged and discharged to travel a set distance, thus prolonging the life of the battery). There is a corollary to that for charging train batteries. Assuming effective battery thermal management, the maximum charging rate of the battery is the product of the number of cells in the battery by the maximum charging rate of each cell. Since train batteries will be significantly larger than a EV battery (they need to tow a significantly heavier vehicle, at a higher speed, with a larger overall drag coefficient), the maximum charge rate for the battery will also be much higher.