A rule of thumb you can use for converting gallons of diesel to KWh for a battery is… 1KWh = 0.30 gallons of diesel. So an 86 gallon tank of diesel is equivalent to a 287 kWh battery to get the same run time.Yes, the scale of the power used by an excavator as described above is much more than an over the road semi truck. Sure they have the same amount of power for starting out but once a big truck is headed down the road on flat ground. It doesn't take very much horsepower at all.
The excavator on the other hand is pulling hard all the time if it's digging. There's just no way to compare it. And there is no scale to describe the difference in how much current you're going to need to charge that battery pack.
Put pencil to paper and figure out how many kilowatt hours of battery pack you're going to have to have to give us 150 horsepower for 8 hours or 1200 horsepower hours.
Then you can say you've started to look at the problem.
The average EV uses a fraction of the horsepower going down the road.
In other words, if you use half of an 86 gallon tank per day, then you would use half of the 287kwh battery per day.
A 287kwh battery pack would give you about 500KW of power or ~670 HP.
A tesla charger (250kW charger) can charge 287kwh battery in about 90 min.