As a self response I should add that since you asked about legality I’m this what it would take with the existing government structure. I think the chance of there being a full on revolution and government rebuild from the ground up is more likely than the idea above.
Bring back Sodium batteries and how to make them as well as solar panel production. Probably to Nikola Tesla.
To be a bit more precise whatever the easiest to produce versions of each are not the best ones so they could actually be produced at the tech level at the time.
I’m sure they would still end up creating equivalents of oil Barons etc. but at least it would be based on a cleaner tech and more able to improve from there.