That's what I was thinking too. The power to drive that large of a truck, which gains weight with every curbside stop... plus run the compactor. It would require a very large battery pack.
Consider that half the weight, and a good part of the volume of the two seater Tesla, consists of its battery pack.
It does not make sense to me for a heavy duty vehicle like a garbage truck. With all that battery, there wouldn't be much room left for job... which is collecting garbage.
Might work for smaller vehicles with lighter, less bulky loads like the USPS delivery jeeps. Even there, they would probably only work in areas with few hills and no really cold weather to drain the batteries.
Battery technology is just not there to make electric vehicles practical for most applications.
There needs to be some fundamental battery technology breakthrough before electric vehicles can become commonplace and an economic alternative to the trusty old internal combustion engine.
My cousin is friends with a guy who runs tour buses in the towns around the Smoky Mountains NP and he looked into using EVs for his vehicles. The killer was the hill-climbing problem. That just kills the electrics. They ended up going with CNG, given the cost of diesel at the time.
Those compactors you see at malls, grocery stores, large office buildings, etc. usually have a 10 hp motor just to compact the trash. Once the store ak worked at had a prolonged power outage ad was running off a large 200+kW rental diesel generator. You could hear genset throttle up to pick up that load when we started the compactor.
That's no problem -- the greenies got the Forest Service to change their pickups from gas to CNG, and put the huge required tank in the back of the pickup, causing it to no longer be a pickup! D'oh! Libs and their propensity for unintended consequences. Doesn't matter if something works or not, if it gives lip service to some liberal shiboleth, it can't be a bad thing, right?