In my use of bistable latching relays, where the state of the relay position is information that must be tracked, I have found it to be easiest to use an optocoupler (H11AA1 or PC817C) to feedback the state of the relay position, which is polled at bootstrap. If you have multiple states to read at boot, you can use something like the TCA9548A multiplexer to accomplish the state read and to set your volatile state variables appropriately, and save on your μC pin count.