I think battery tech is such that a battery capable of 4 hours of HVAC (even in a degraded mode) or low speed movement to the next station is entirely feasible and should be standard in all new stock and retrofitted where possible. I say 4 hours as evacuations invariably seem to take 3.
I think this is probably one of the better mitigations. However, my experience of Green Book style business cases is that whilst the strategic rationale writes itself quite easily, the economic element is more challenging. The basic problem is that putting resilience into systems in this way means you are investing quite a lot of money for systems you hope are rarely used, and often you are not sure to what extent it will be used. So having redundant and resilient infrastructure often doesn't appear to make economic sense so doesn't get funded, especially if it is competing for funding with schemes that have much more certain benefits.
There are apparently about 15k railway carriages in GB, and given all the design work and validation etc, I would think a national roll-out of batteries might be in the realms of £3-5 Billion. You could have 5-10 schemes the size of Ely Junction upgrades for that kind of money. Or a shed load of OHLE, track and structure/earthworks interventions that reduce the risk of stranding in the first place. Which of these is more worth doing? Ones that delivers operational benefits every day, or the one that helps perhaps 10% of the time? From a DfT/regulatory perspective, this probably means somebody has to seperate out this into a separate funding scheme (and justify that to ministers and the public).
The other thing people do is to make it make sense by stacking other benefits. In some future sunlit uplands where all trains have have batteries, obvious options are (i) more discontinuous electrification, (ii) perhaps relaxing the security of supply requirements on existing traction power, (iii) avoiding power supply upgrades as the trains use the battery to accelerate, smoothing out their power draw and (iv) At night the trains play vehicle to grid whilst they're parked. But all this adds other potentially uncertain benefits to the valuation, as well as increasing the scope, cost, risk and complexity of a programme
Final thought. Batteries are being seen as a silver bullet here because we have ended up in a situation where we're most concerned about stranded trains that are not safe in extreme weather without continuity of electrical supply to run the HVAC. But as noted, this extreme weather reveals shortcomings in the specification or maintenance of the HVAC, toilets, engines etc. Batteries can't help with this, and they might not help much with other weather-related issues like lineside fires.