The
literal last mile is the easiest part, actually. Electric trucks with a range of 300km are already widely available, and that's more than enough for local use.
Besides, in Europe there are pretty stringent rules about driving times already. You need to take a 45-minute break every 4.5 hours, which at 90 kmh is every 400 km. You can split that into a 15-minute break and a 30-minute one, requiring an even shorter range. Meanwhile, Germany is trialing overhead wires on highways, which would allow for an even more reduced range.
The way I see it, the truck isn't the problem: building the charging infrastructure is.