You know your approach is wrongheaded and dangerous. But that's also because it is not necessary.
We'll do my favorite trick: Permanent wiring methods temporarily. In other words, wire it up all Code legal like it'll be there for 50 years, and then 50 hours later, undo it.
It is perfectly legal to install an inlet on your home that powers any number of outlets in your home. It's also legal to use flexible cord for the inlet, if it's to be frequently unplugged.
Going into your heater socket is bad because there's a thermostat in the way. So instead, we'll go into the thermostat location. But hold that thought.
Rewiring the service panel
First, in the panel, we take some photos (this can be done well in advance), and identify the circuits we want on generator backup. We also identify the fat 10 AWG cable going to the heater. It'll have a black and white wire. We take the black wire, and join it to all the black wires from each of the circuits we need to power on generator.
Now here's the tricky part: we follow each circuit black wire, back to its cable, and identify the white wires also in that bundle. We pull those off the neutral bar, and join them to the white from the heater. Don't just leave them all on the neutral bar; pull them off. This is important, because the generator GFCI will trip if you don't.
If any of these cables have a red wire also, you need to figure out whether you need red or black, and connect that one to the black bundle. If the wire is 12 AWG, you can just connect both to the black bundle.
At this point, none of the wires for the heater circuit or desired circuits are on breakers or neutral bar anymore. They are nutted to each other, using the service panel as nothing but a splice box. This is Code legal.
The ground wires, leave them where they are.
At the thermostat
Now, back at the thermostat. Open up the thermostat, take photos of the existing wiring as-it-is. If you feel it'll help later, mark some wires with tape before taking the photos. Now, remove the thermostat, and store it.
Now, we need a heavy duty 12 AWG appliance extension cord. Oh hey, that suicide cord you already faked up needs to be destroyed anyway... so let's kill two birds with one stone. The 240V (NEMA 6-30) plug you added -- remove it. Get to black, white and bare.
Now, get an appropriate blank cover plate for the thermostat box. Except we need a cover plate with a knockout on it. We also need a proper strain relief for that cord; an electrical supply house will have no trouble setting you up if you bring in the cord. Install the cord in the blank cover plate, with the strain relief, and secure it.
Now, in the thermostat box, identify the cable that goes back to the service panel (not the one going to the heater). With those wires, splice cord bare to cable bare, cord white to cable white, and cord black to cable black.
Install the cover plate and screw it down. Now you have a flexible cord coming out where the thermostat had been, with a plug on the end. This is a code-legal inlet.
The use of a flexible cord is legal because this will be connected and disconnected frequently. As in, twice.
Once the crisis is over, rollback the wiring to the way you found it. Take the cable-with-cover-plate-on-the-end, and throw it in the emergency kit for next time.
The one Code problem here
Presuming the generator's circuit breaker trips at 20A, we may be connecting 14 AWG /15A circuits to a 20A breaker, which would violate NEC 240.4's statutory limit of 15A on #14. (thermally it's allowed 20A at 75C temp). However, the practical likelihood of overloading them is low, since you'll be powering several circuits off one 20A breaker, and it's unlikely for one 15A circuit to gobble up more than 75% of total available power.