Currently only ~2% percent of vehicles sold are electric. Going to take 10 years just to get to 50% of sales. That's not even including commercial vehicles.
TLDR - it's going to take somewhat longer than that.
If the truck is 'idling' with the electricity flowing from its batteries, the pollution and climate impact is just dislocated in space and time to the power plant when the truck is charging.
If the truck is off, then there is no problem, but now ICE motors also can automatically turn off and on.
An EV engine just stands still. If people use power, they draw that from the battieres, however this energy is not wasted but employed for something useful.
True, if it's idling, but many (most? all new?) ICEs now automatically stop when the car stops.
Trash collection just dislocates rotting food scraps and garbage from city streets to a landfill. I think it's an acceptable arrangement!
I assume the vehicles are idling to keep the heater on, or the engine warm. Also, it seems like diesel is different from unleaded gasoline in terms of what engines can do or not.
Isn't that the major point (aside from get the heck out of the way) of these anti-idling laws? Reduce the localized noise and air pollution.
Also NYS gets a ton of electricity from carbon-free sources.