So much love for batteries and so much hate for Hydrogen? The fact is, batteries aren't suitable for many applications because of their power to weight ratio. Commercial aviation, freight trucks and trains come to mind. In some use cases batteries could work for trucks (yard goats, intermodal) but if you're hauling 40 tons of freight over the rockies in the winter batteries aren't going to get you there with anything available or on the drawing boards for the next decade.
Manufacturers have had a century to improve internal combustion engines and make them viable for a broad range of applications. No one approach will be able to replace them all out of the gate. It will be a case of matching the right tool with the job. In some cases a battery will work in others a hybrid and in others alternative fuels in an internal combustion engine. An electric scooter with 100 mile range may be practical in a large city with swappable battery stations strategically located at every 7-11 but there's no way it would make sense to try to drive the same scooter to Boise.
Hydrolysis isn't the only way to get hydrogen. To be honest, there have been more improvements in hydrogen extraction methods in the last decade then there have been in battery technology.
Microwave plasma pyrolysis takes 1/4 the energy to produce hydrogen that's free of CO2.
There are a number of issues with the rare earth minerals required to make modern batteries. The environmental damage extracting them, the political concerns since many of them are controlled by one country (China is NOT your friend), and the issues with disposal once they're used up.