Battery removal circuit via interruption
If you you have battery and supercap directly connected, then there is no easy way to detect battery removal. But you can place a diode between battery and supercap, with cathode towards cap. Then you can measure battery removal at the diodes anode with a MCU pull down resistor enabled IO port.