Battery charging is fairly easy to arrange on routes that are non electrified throughout.
At the terminus, and at any places where the trains remain, install a short length of conductor rail, probably* at the standard "southern" voltage of 750 volts* DC▸ .
To reduce the risk of accident, place this centrally between the running rails, and render it dead except when a train is over it.
Charging rate would depend on the available electricity supply, perhaps supplemented with PV modules.
A small but 11KV supply would allow charging at 250 Kw in the dark, or at 270 KW in dull daylight, or at 350 Kw in bright sun. A 100 KW PV array would fit on a large station or other building.
To allow for stabling away from the usual locations also design for plugging in to the mains with a suitable cable. A domestic 13 amp supply is SLIGHTLY better than nothing but only slightly as charging could take a week ! Even a 13 amp supply would allow use of the internal lighting, and of a couple of vacuum cleaners for servicing without any battery discharge.
A 3 phase 32 amp supply, available almost everywhere, would give a significant charge overnight.
*Or possibly a lower voltage since this would use standard transformers.
11 Kv transformers with a three phase 4 wire output at 250/433 volts are a low priced commodity item as vast numbers are used to provide the standard 230/400 volt supply used everywhere. Two such transformers, one with reversed polarity would produce a 6 phase supply, easy to rectify and connect to the conductor rail.
Apart from low cost, the other merits are that standard, off the shelf, grid tie PV inverters may be used to connect PV modules, and it MIGHT be acceptable to use the same transformers to supply other loads.
Would the short turn round times on the branches allow enough time for a charge or even a boost if the train had been charging overnight in a depot.