If you have 3 cars in a row, and the first car spots a problem, it can't start braking until after the 2nd car has started, but the 2nd car can't start braking until after the 3rd car has started.
It gets linearly more dangerous as more cars are added.
Not saying it can't be done, but the problem is more subtle than just working out how to stop the cars from crashing into each other at speed: they also need to be able to brake in emergencies without crashing into each other.
Possibly the way to do it would be to mechanically couple the cars like a train, so that it is safe for the one in front to start braking earlier than the one behind, albeit with reduced performance.