Pi Zero SD card full?!?

It is DietPi, i.e. less than half of the initial disk usage compared to RPi OS Lite.

However, 4.6 GiB available disk space should be more than sufficient to rebuild the gravity database? What is the size of the current one?

ls -l /etc/pihole/gravity.db

But I remember a team member who had similar issues with millions of blocklist entries. The error message does not indicate it, but AFAIK, part of the database assembly is done in RAM or /tmp tmpfs, and the 512 MiB of the RPi Zero is too small to cover that, unless you create a sufficiently large swap file.

@Pups_Gesicht
What is your swap size?

swapon

And can you check RAM usage during gravity update e.g. via dedicated SSH session with htop running?