Running in read-only system mode prevents system files from being corrupted due to issues with SD card corruption. My approach adds data partition (and optionally a second 'mirror' one for backup) where required directories and files will be stored.
brunogama/pihole-readonly-rootfs
Installing Pi-hole on read-only rootfs system to prevent major SD card corruption
ShellMIT