Hydrogen strategy optimization for a sustainable electricity grid