If gasoline cars were invented today, they would never be allowed to be sold to consumers, because gas is too toxic and too flammable to allow ordinary people to use it.
Except you can. The Toyota Mirai is available and quite heavily subsidized. Whether buying one is a good idea is a different question, although the main issues with owning one don’t involve safety as far as I know.