I’ll be dammed. Some years ago (Feb 2018), I was pondering the accessibility of trains for people with wheelchairs, buggies (prams, pushchairs) or mobility scooters…
I contacted a train manufacturer that had just gotten a large UK order and asked them how they were addressing this. They never got back to me.
I thought that a ramp that automatically slides out and retracts should be possible.
A stranger in the Netherlands who spotted my post then helpfully e-mailed me this drawing:

I just took a trip with a Dutch Sprinter train… And what did I see? A ramp that slides out and retracts.
This idea has actually been implemented and has been on these trains since 2021: https://www.bnnvara.nl/kassa/artikelen/alle-sprinters-ns-toegankelijker-voor-rolstoel
It may depend on the station how well it works. Newer stations have higher platforms; the slide-out ramp is flush with it.