Actually, such a contraption is already being marketed! It's a generator/trailer to keep your EV going. At first I thought it was a joke, but apparently not. Why don't people just buy a hybrid?
https://gajitz.com/little-generator-trailer-lets-electric-cars-go-the-distance/