You could just do a home-run of 10/2 from the service panel to the heater receptacle, and your problem goes away. Here I consider only options cheaper than that.
Here's what I'd do. It's tedious, inelegant and involves messing with wires in the rain. But it works and is safe, assuming you are competent.
TLDR: manually re-wire your house every time you want to switch.
Install a transfer switch in your service panel if you don't already have one. You need that regardless. Near the generator's side of the transfer switch, install a 30A 240V breaker in the panel. By "near" I mean close enough that the wires could be moved over to it.
Install the largest junction box you can, at whichever point the heater line diverges from the generator line, that is, where you would change the wire splices so it goes to the heater instead of the generator.
To run generator, alter your wiring to use it for a generator:
- main power off and generator breaker off
- open up your service panel and move the wires to the generator breaker
- open up the junction box and splice the wires to go to the generator inlet
- make sure you did everything right
- generator breaker on
- light up the generator
To run heater:
- main breaker off and generator breaker off
- open up the junction box and move the wires to the heater receptacle
- open up your service panel and splice the wires to go to the 30A breaker
- make sure you did everything right
- main breaker on.
Take your time, make sure you did everything right.
You could also do it with two DPDT switches, but you'd absolutely have to have those interlocked so they throw together. That is possible, but is more expensive than a 10/2 homerun. "cheap" is the operating principle here.