Just FYI ... they already race electric cars in the Formula ‘E’. They solve the recharge issue by allowing each team to have two identical cars ready to race, fully charged up obviously. Then the race distance is set to force each team to make the driver switch from their first car to the second.
While the cars look much like ICE race cars they are much lighter and consequently more fragile. Just about any contact with another car or an obstruction is likely to be a race ending event for that team.
The competition is generally pretty good and the cars are not slow.
Formula E cars, despite having less than half the power of an F1 car, are actually HEAVIER than F1 cars.