Ah yes, a comment from the morality police. According to international law, if the electrical grid directly enables Iran's military, then it is a valid military target. In every major conflict since WWII, electrical infrastructure has been targeted. This includes WWII, the Korean war, Vietnam War, Iran-Iraq War, the Gulf wars, 2003 Iraq War, and the Russo-Ukrainian War.
So no, it's not automatically a war crime, it's a case-by-case basis.
And claims of "genocide" from are laughable and ludicrous, the target is the IRGC, and regime change. If they wanted genocide there are far more effective ways to do so.