Right, that's along the lines I'm thinking. A solenoid or relay that kicks in once it's running to charge battery #2 and disconnect it when the ignition is off. But this has problems:
1. The wiring and solenoid to #2 has to be able to stand full engine-cranking current draw. If #1 is dead, the full load will be pulled from #2. That's ok if the wiring is heavy enough and it's a regular starting battery, not a deep cycle. A deep cycle would be quickly ruined by that kind of use.
2. Starter solenoids are not made for continuous "on" like that. I don't think it would last very long.
3. Deep cycles are more useful as the #2 for running steady low to medium draws, from electronics to winches.
There is another type of kit that uses a set of diodes to isolate #2. Current can go to #2 to charge it but not back into the vehicle's system. You then connect accessories to #2 and run it dead, #1 is still good. It has no switches, it's automatic. I've used one and it worked great. Its only disadvantage is that the diode costs about 1/2 a volt, very slightly reducing the charge you can get into #2, but that's pretty minor.
A few times it would have been great to have a switch to bypass that diode box to recharge #1 from #2 when I ran it dead. The problem there is if it's very dead it's nearly the same heavy load as starting which deep cycles don't like. So how to do it without killing the deep cycle?
I plan to use the store-bought diode type isolator kit. I'll add a switch, relay, resistor, and wire to bypass it to let power back to #1 at a safe rate, like 10 amps. Using it this way in emergencies won't kill the deep cycle. You'd just have to give it some time to transfer power from #2 to #1 and flip that switch off before you hit the key.
If you only plan to use #2 for emergency starting and use a starting battery not a deep cycle, a starter relay might work, but I'd a really heavy one.