The surprising ways to cash in on the electric-car boom