Mainline trains is a non-starter for many decades, though, at least in the UK which still has a large number of level crossings, as well as stations with "fun" issues such as being too short for the longest trains. There is tech solutions in place to prevent the wrong doors from opening. Except when it doesn't work, where you really need someone on the train.
And yes, it does fail. Been on trains when the doors refused to open because the system failed to recognise the station. For ages, the trains also waited for ~30 seconds to open doors at London Victoria, supposedly because the system that recognised the stations used GPS, and the station concourse at Victoria is too deep for the trains to get a signal. Don't know if that is true or not, but in any case automating even door control was a long, complex project that still has issues years later.
Steps will keep being taken towards automating more of it, but there is decades old rolling stock, so any upgrades will take accordingly long to spread through the system as everything gets upgraded.
Isle of Wight for example, ran on London Underground 1938 stock trains until last year, when they started upgrading to refurbished British Rail Class 484 rolling stock built in the 1970's and 1980's...
With respect to renewables, not all of the UK network is even electrified yet...