It is, and as much as we all want to pretend this is always about rent seeking.
There can be other reasons.
Some systems are bought in manners that include service contracts and outs liability on manufacturers. In such scenarios one man's kill switch could be a safety feature.
You don't want unauthorized personel messing about a medical x-ray device. Because (a) you want it to work, (b) there might be 10k+ volts sitting in giant capacitors.
I'm guessing it's similar with airplanes.
---
In complex enterprise systems, right to repair might not always be simple.
But if it comes to your home appliances, a tractor, car, etc. I'd be a lot less worried.
This is simply solved through liability. If someone can provide the service and liability guarantees for less than the manufacturer then you hire them.
John Deere is proof that the manufacturer alone can't be trusted because they can't provide timely service in a time-critical industry.
Such liability issues are usually solved with a warning label. "Warning: 10000 volts. No user-serviceable parts inside." If the customer chooses to unscrew the cover and carelessly electrocute themselves, that's on them. It's much cheaper, too, than making the train brick itself if it's detected in specific geographical areas.
If that's regulation, yes please.