Yes, hydrogen has better energy density than batteries, but that is only because batteries are the
technology of energy storage on planet earth in terms of energy density. It still is by far the worst of all *chemical* energy carriers(petroleum-based fuels, coal, natural gas, methanol, ethanol, ammonia, literally any other fuel) in that regard.
So, major problem number one: in practical applications, hydrogen has to be stored either
- under very high compression (up to 700bar) at ambient temperatures, yet it still suffers from very low volumetric energy density, or
- in liquid form in cryogenic temperatures(below -252.9C) at atmospheric pressure, which improves volumetric energy density, BUT this
- requires about 30% of its energy content just for the liquefaction (more if you want to compress it further as a liquid, to transport it through long pipelines for example)
- requires continuous consumption, because even in the presence of excessive insulation, some heat transfer from the surroundings to the tank inevitably takes place, which leads to vaporization of the liquid hydrogen and therefore gradual pressure buildup, which will either cause leakages or an eventual blowoff
And then, there is technical problem number two: the infrastructure for hydrogen transportation and distribution is practically non-existent, unlike in the cases of
- natural gas, for which a dense network is already in place, because it has long been used for power generation and heating, so it can be more easily extended with refueling stations for the transportation sector
- ammonia, for which a mature transportation and distribution network also exists, because its has been used widely as a fertilizer since the early 20th century
- methanol, which is very, very easy to transport and distribute, because it is already liquid at standard temperature and pressure conditions (25C, 1atm)
So right now, the most realistic options for transporting and distributing hydrogen are
- through the existing pipelines for natural gas, as a component of natural gas-hydrogen mixture
- through some indirect chemical storage medium, such as ammonia(NH3) or methanol(CH3OH)
This is why I think this project in Germany is very interesting, as it will probably help expand the nascent hydrogen transportation an distribution infrastructure (hopefully).
Incidentally, the Japanese, who seem to have put their money on hydrogen as the pathway to energy security and decarbonization of their economy, are really hooked into the idea of using ammonia as fuel, either in internal combustion engines or fuel cells, for precisely these reasons. The challenge regarding ICEs is that ammonia has terrible combustion properties (very low reactivity, high NOx emissions, high unburned NH3 emissions etc), so at the very least it must be used as part of a blend with hydrogen or some carbon-based fuel and then, the optimal combustion mode and injection type is not clear, so they are very far away from the point of commercial viability. I am not sure what the particular challenge with using ammonia in fuel cell vehicles is, if any, maybe the standard problems that plague fuel cells.
PS. I copied the attached graph on comparison of energy densities of various technologies from a Japanese guy's paper and print it here without permission, don't report me guys!