Back of the napkin calc: NASCAR cars get 5 mpg, hold 22 gallon tanks --> 110 miles max range. Average speed of 170 mph --> a maximum of 39 minutes of racing.
If they currently pit every 35-39 minutes or so, it wouldn't be completely impractical to pit every 30 minutes or so: have pit crews do a quick swap of the electric batteries at the same time as a the tire change.
Well batteries are much much heavier and would likely be in the centre of the car for weight distribution, and you need to make the electrical connection. Changing a tyre during a race just takes a speed gun and one nut.
If they currently pit every 35-39 minutes or so, it wouldn't be completely impractical to pit every 30 minutes or so: have pit crews do a quick swap of the electric batteries at the same time as a the tire change.