Vehicles with self driving capabilities should in my opinion be required by law to have black boxes like the ones from jetliners. And the tools to read the data must be given to the the government.
Tesla's "black box" data is obtainable like any other kind of crime scene evidence, via court order.