The most expensive part of electrifying existing track is bridges and tunnels since they often have to be rebuilt to have enough clearance (especially in places like the UK where bridges are old and therefore very low. If all the trains have enough battery to move a short distance without the overhead wires suddenly the electrification project becomes pretty simple and non-disruptive and costs are really reasonable.