Agreeing on a standard protocol for both connectors and communications is a relatively easy problem if you have an industry with a dozen or so operators rather than 300 million private owners. It also solves the other major reason trains don't regularly crash, which is regular maintenance.
This same reasoning applies to non-self driving cars, but somehow we do have a few privately owned cars around. The only way self-driving would make it any different would be if self-driving cars were so much more expensive that only very few would be able to afford it. If you however try to estimate the shape of the demand curve, you'll note that even today that are plenty of cars sold at $100k mark, so unless self-driving cars are many hundreds of thousands of dollars each, you'll still see privately owned self-driving cars.
More importantly, once the technology is out in the wild, many manufacturers will copy it, and it will push down the markup for self-driving capability rather low. You can sell a self-driving Toyota Corolla for $100k if you're the only manufacturer of self-driving cars. Once Nissan and Ford have their own equivalent technology, you can no longer do that.
At that point I start worrying that self driving cars externalize the cost of congestion off the driver to the public at large. Everyone has to deal with congestion except the people inside their self driving cars yapping on their phones.
Some people will car share, but most will decide that the convince of having their gold clubs in the trunk is worth having their own for the little cost difference it will be.