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.