"Very closed, homogeneous and controlled" while true when you're comparing against planes or cars, is not true in absolute terms.
In a 200 km radius from where I live I have:
- Automated brand-new metro lines. Platforms are separated from tracks with doors that sync with trains' doors.
- Automated but supervised rail and metro network, equipped with ATO and other safety systems. Still with humans on the very first row to look for obstacles, such as cars, malfunctioning junctions, suicidals, etc.
- Non-automated rail network but with automated, supervised signal control.
- Non-automated rail network with manual signalling.
In essence, what it prevents from automatizing all network is:
- Required investment: To eliminate level crossings and other risks
like that, to build a reliable signalling infrastructure, and to
adapt the rolling stock to it.
- The human factor: Many people don't trust automated machines, specially if their life depend on it.
- Jobs: Many people would lose their job, and this usually means less votes for the ruling party. It's easier to build new automated
lines than adapt existing ones.