Dear @martijnthe,
we have been able to successfully get the boot time of our Terkin-Datalogger [1] from about 25 seconds down to about 3 seconds by freezing the modules like outlined by @robert-hh. The code base including all third-party modules is around 10 kLOC and we have released the result as builds called Annapurna [2].
With kind regards,
Andreas.
[1] https://github.com/hiveeyes/terkin-datalogger
[2] https://community.hiveeyes.org/t/annapurna-firmware-for-pycom-esp32/2754