The proper way to handle the power path for the RTC is to connect either the main batteries or a coin cell to Vbackup on the PMIC, and then connect Vrtc from the PMIC to VBAT on the STM32. That provides constant power to the stm32 rtc, either from main system power or from the coin cell if the main power is missing.
Unfortunately it’s really not feasible to do that mod. The PMIC is a QFN so getting to Vbackup/Vrtc is basically impossible, and VBAT on the STM32 was incorrectly tied to MCU_3v3, requiring lifting that pin. Boo. You can ignore the PMIC and connect a coin cell directly to VBAT (or to the main battery, but a coin cell is safer), but you’re still stuck having to lift that pin.
At worst the register cache can only take up 256 bytes (if the entire register space is used), which is a pretty trifling amount of RAM these days, even on the F103. But it’s not the only way to handle the i2c comms; you don’t actually need a register cache at all. But it’s easier if I provide a patch