In the early years of the 20th Century the Horse drawn wagon for freight delivery was essentially replaced by the truck. Not by motor trucks, but by the electric truck.
More electric vehicles here:
So what happened to the electric truck? The pictures tell the story. An electric truck in 1920 or 1930 doesn’t look any different than a truck from 1900. That was a completely different situation from the gas and diesel trucks of the same period. Also the manufacturers of the electric trucks were fairly small, making trucks more or less to order. Then there was the extra infrastructure required to keep electric trucks running and all the batteries that the owners had to maintain. The fact is that lead acid battery technology had reached the point where there weren’t any real improvements that could push the technology forward.
Meanwhile, the internal combustion engine continued to improve and the infrastructure of fueling stations repair garages expanded exponentially. The Gas or diesel engine truck was simply more flexible and available. The fire concerns pretty much disappeared and with gas stations on every block corner, the owner didn’t have to worry about a truck being suck because it ran out of fuel. I suspect that insurance rates declined for gas powered trucks as the fire risk was reduced and the reliability and availability issue with an electric truck simply could no longer be ignored.
Then the double whammy of the Great Depression and WW2 changed how transportation services were provided. The trucking industry went from short haul point to point delivery as model to a long distance multiple stop delivery model and the electric truck was useless for that business model. That was the end of the electric truck.
The same thing happened with cars, though it happened earlier. As cars went from a short distance machine to take the owners from point to point, to something that could be used to travel great distances then the electric car simply became unviable. As the gasoline automobile evolved in the early 20th century, the electric could simply not keep up.
The electric taxi was a case in point. It simply became the case that the downsides of electric taxis could not overcome their advantages as gasoline powered automobiles continued to develop.
The electric truck and cab simply could not keep up with the improvements that the gasoline powered truck and car received with every new model year. The electric manufacturers simply never developed a market large enough to fund the kind of engineering that it would have taken to keep up. With so few vehicles in operation the infrastructure required to support a viable transportation system. Without that infrastructure that the electric vehicle never had chance.