It would be very good if you could enable htop's thread view (F2 -> Display options -> Tree View or F5) and also enable custom thread names to be shown from htop's settings (F2 -> Display options -> Global options -> "Display threads in a different color" and "Show custom thread names") and then provide another screenshot.
This would hopefully help us identifying the culprit here. We already know that this issue exists when the database is broken, i.e., when you see the massive load especially on the database thread, I'd suggest you try
sudo service pihole-FTL stop
mv /etc/pihole/pihole-FTL.db /etc/pihole/pihole-FTL.db.bck
sudo service pihole-FTL start
and see if that resolves the issue.
If you need the data in your long-term database, you can attempt a recovery, however, this is a process that may not always work and might consume a lot of time and disk space in intermediary objects.
pihole-FTL sqlite3 /etc/pihole/pihole-FTL.db.bck ".recover --ignore-freelist" > recovery.sql
pihole-FTL sqlite3 /etc/pihole/pihole-FTL.recovered.db < recovery.sql
rm recovery.sql