Apologies if this is mentioned upthread, I've just caught up but may have missed it...
The dangers of third rail are fairly easy to understand, and I can see how those responsible for safety are averse to it. That said, I don't get the impression that scores of people are actually electrocuted by third rail each year. It either happens very rarely, or it is so common that like RTA casualties it isn't worth reporting each individual incident. I suspect the former is the case. On a personal level, I'm more concerned with the danger it presents to railway staff who have no choice to be there, than the danger it presents to trespassers who have chosen to break the law. Technology that allows the rail to only become live when a train is present, would minimise the risk to both groups, and if you're on the track and a train is coming, electrocution is the least of your worries. However as others have pointed out, such technology would be complex and therefore expensive.
Batteries are a solution in some places, but battery technology hasn't significantly improved in terms of range or energy-density for the best part of a century, up until the latest EV "boom". There's still no answer to the rare-earth metals question, and the weight of large batteries required to move a train at any sort of speed is significant. On lines with anything other than the lightest use, there's no substitute for electrification. For somewhere like the Marshlink, ideally you'd go for 25kvAC but with lightweight "Paisley Canal" style catenary... or you go for 750vDC catenary which removes the need for dual voltage stock- you just need dual pick-up. That said, pretty much all modern DC stock is dual-voltage capable anyway.
The idea of replacing existing third rail with batteries is utter madness though- unless someone invents a lightweight battery with the capability of the current market leaders.