However those don’t work with some passengers - wheelchair users for example, people with difficultiy holding handles etc.
Making toilets more accessible for some groups makes them less accessible for others (. As a society we choose what level to have it at.
Some trains in the U.K. have a good balance - a large wheelchair accessible toilet, and a small traditional one, although they sometimes struggle with communicating it.
The caveat here is that I'm not an expert on this, and that I'm possibly argueing from a position of ignorance. But none of the people claiming accessibility benefits (there are several) have made a very convincing case, beyond a mere assertion that it's more accessible. The door design as such is more accessible, but I don't think it actually matters in this context.
As such the solution is an electronic sliding door (as many couldn’t provide enough strength over distance to open a sliding door manually), meaning an open/close button
Once you have that feature adding an electric lock makes sense. A physical lock would be trickier to incorporate.
It's kind of off-topic but please correct me if I'm wrong.
Local government chooses the train service operator. The operator chooses the providers of machines (trains and carriages). Engineers design those machines according to some more or less specific guidelines from product designers. Their managers and peers provide the missing details.