2040 feels far too soon for this thought experiment, at least in the U.S. ICEs will remain the primary vehicle for most families until charging networks are built out. 40-50 years is more realistic.
(No, don't ask me how that would work. I don't know. I just think that private enterprise could do it quite quickly, if they saw a way to turn a profit doing so.)