This requires batteries which are very heavy. This is not a big problem in cars, but an absolute deal breaker in aircraft. The energy consumption of a plane scales roughly with the weight, which makes efficient battery powered flight pretty much impossible.
Current battery tech just isn't that good. A Tesla battery pack weighs 900 pounds and only holds the energy of 3 gallons of gas. They are also a hell of a lot more expensive and wear faster than a gas tank.
Carbon hydrogen bonds are one of the best ways to store energy that we have.