I sort of agree with you, but subject to the understanding that a 12V UPS is already there. Or mostly there.
The UPS battery is the car battery.
Else it is a 2nd 12V battery - whether a small 1.2AH or duplicate car battery etc. (And AGM if internal; or flooded if in a sealed & vented enclosure.)
It you have a Charge Lamp (as do older cars), then you have your charging signal that connects the PC battery to the main battery. SIMPLE!
From there it depends on the PCs UPS handshaking.
But to have a separate UPS battery (which is NOT 12V) is IMO ridiculous!
There are other sophisticated mind reading devices, but these are probably out of scope for most. (Ha - out of scope... get it?)
There should be oldskool texts that explain how switches are used to select operating modes. These may involve combinational logic which is often done by uPCs these days...