Medium and heavy-duty trucks (eg Class 8 long haul freight) were supposed to be difficult to electrify. But falling battery costs and rising energy density combined to boost sales sooner than expected.