In the recent past, I used a SoC in which GPIOs could be configured as "open drain", that is in which there is an internal transistor where the SOURCE is grounded, the DRAIN is left open (the exposed GPIO pin) and the GATE can be controlled internally.
In that configuration, I connected a sensor VCC to the battery and sensor GND to the open-drain GPIO. Then, I could switch the GPIO status programmatically between "disconnected" and low (grounded) and so power on and off the sensor without adding an external transistor.
I can't find an explicit "open drain" configuration for nRF52810 GPIOs, is there a way to do this?