Could you do similar to diagram 2, but instead of an N-FET use a P-FET between the battery and first resistor in the potential divider?
Add a gate pull up resistor to source to ensure the FET is off by default, have the micro pull the gate down to take a measurement. You’ll probably need to add another resistor on the control pin to 0V to limit the voltage there also, but those two can be much much higher values to really limit current. Or use a zener/TVS diode instead of second resistor to clamp the voltage instead of dividing (more robust).
Switch it with an NFET
The micro will see 0V or divided/clamped battery voltage on the measurement pin.