@kjm Itäs getting kind of complicated, but it is just the usual search for all the nasty little rough edges of the ESP32 and it's IDF. It seems to be full of features and full of bugs as well.
Using an external clock vs. the builtin has different properties:
External: Devices like the DS1307 or DS3231 are precise, properly tested and reliable. And the clock with an own battery is truly independent from all hiccups that the ESP32, it's firmware and it's power supply may cause. The DS3231 may also be used as power fail detector and for wake-up. In addition, both could be used as 32kHz clock source or 1 Hz Interrupt source. Of the two chips, the DS3231 is truly the better one, with integrated temperature controlled crystal and a guaranteed 2ppm precision.
Internal: Simple (yes!) integration in the hardware and existing integration into the firmware. It can be used for a precise deepsleep period. But to add it to an existing board like the Lopy is surely a little bit of work. Usually a crystal would be directly integrated.
Pin wise the two options are similar. Both require 2 pins. But the external I2C clock can share the pins with other I2C devices.
Since it does not use test time, I continued the testing. A 15 hour deepsleep on the crystal ended just exactly at the expected second. The crystal frequency at that test was shown as 32769.01 Hz. This is way better than one could expect.
On the down side, I noticed that a call to machine.reset() seem to affect some rtc clock registers. I did not expect that. Hard reset should surely affect that. At least deepsleep wake-up keeps the rtc values.
Note: I test the rtc with deepsleep, because when power is applied, the clock source seems to be the main crystal. And - good for testing - the RC-Oscillator of my test device is off by 1 second per minute. So 10 Minutes test time is by far sufficient to tell, which clock is running.