Isn't that what we do with building codes, fire safety codes, airline industry regulation, electrical safety regulation, gas regulation, food hygiene, product labelling, site safety symbols, and many more?
Collectively decide what needs to be done for something to be considered safe enough, then regulate that it must be done that way for it to be allowed. Maybe this could be "self-driving car approved roads" and self-driving cars must check their navigation systems and only travel down approved roads. Drivers then get to lobby their local or state councils to make more roads follow the self-driving car markings and signage, and when they have, cars become permitted to drive down them next time they update.
Until people realize that it will be an endless stream of "we just need to fix these corner cases" or put more constraints on the physical world because the cars aren't smart enough.
That is one way of considering trains and trams, and they're good enough to be useful with extreme constraints on what they can do.