Disable pihole breaks DNS, Pi-hole v5.1.2 and FTL v5.2

From your debug log, it would seem your database has been corrupted:

*** [ DIAGNOSING ]: contents of /var/log
-rw-r--r-- 1 pihole pihole 5638 Sep 12 08:22 /var/log/pihole-FTL.log
   -----tail of pihole-FTL.log------
   [2020-09-12 07:44:15.230 526M] SQLite3 message: database corruption at line 67286 of [3bfa9cc97d] (11)
   [2020-09-12 07:44:15.230 526M] SQLite3 message: database disk image is malformed in "SELECT VALUE FROM ftl WHERE id = 0;" (11)
   [2020-09-12 07:44:15.231 526M] Encountered prepare error in db_query_int("SELECT VALUE FROM ftl WHERE id = 0;"): database disk image is malformed
   [2020-09-12 07:44:15.231 526M] Database not available, please ensure the database is unlocked when starting pihole-FTL !

You could confirm this by running a quick integrity check for your db on your Pi-hole machine like this:

sudo sqlite3 pihole-FTL.db "PRAGMA integrity_check"

The safest measure to alleviate this would be to move or delete that defective database, e.g. by executing:

mv pihole-FTL.db pihole-FTL.malformed.db

The older query history may still be recoverable in parts from the malformed database.
However, if you can do without that history, I would recommend to delete the malformed db altogether.
Above command is just moving it out of the way for the moment, allowing you to keep it until you've made your mind up.

A fresh (but empty) pihole-FTL.db will be created once you restart pihole-FTL, eg. by:

pihole restartdns

And finally, while db corruption was possibly the cause of your observation, there's still to ponder what caused that corruption in the first place.
File corruption could hint at your sd card nearing its EOL, or possibly at a power supply issue, or maybe you had any powercuts lately?

You could check your logs for recent under-voltage events by running:

grep -ni "voltage" /var/log/syslog*