There are actual real solutions to this. Just look to the older cultures that ate lots of beans.
In many parts of Africa the ultimate solution is to peal the skins off the beans. This removes all digestive issues with bean consumption but it's a lot of work.
Another solution is to uses the microbe Aspergillus by consuming Miso paste with the beans which help break down indigestible polysaccharides.
Hydrogen's volumetric energy density is about as good as lithium-ion. The cost of replacing a hydrogen tank vs a lithium battery is absolutely massive. You also aren't considering the energy density lost in cold weather for batteries.
In many parts of Africa the ultimate solution is to peal the skins off the beans. This removes all digestive issues with bean consumption but it's a lot of work.
Another solution is to uses the microbe Aspergillus by consuming Miso paste with the beans which help break down indigestible polysaccharides.