I use pi-hole as my local DNS Server behind the router with provides also DNS.
I wrote two little graphical programs (Windows and MacOS) piholeonoff.exe and .app to switch between these two DNS Servers so you can switch pi-hole between your clients and the Internet and/or do a "direct connection".
The two programs are only starting Windwos System commands / Mac OS Applescript command to do this. These commands are editable for everyone.
If someone find any of the two useful i can send it over to you. Written in pureBasic.
If you want to share it, you should use github or something, so code can be validated..
Not shitting on your idea which has some merit but turning off Pihole defeats the purpose of having a proper managed list or whitelist. Many TTL are some times hours or days and if someone was trying to get in through malicious ads turning it off temporarily defeats any benefit of having the system. Turning it Off-then-On will not stop sites already resolved or cached. Spend more time with a proper block List or take some effort in seeing What sites are being denied and if they should be "allowed". Many "legit" sites fight against ad-blockers so prevent site content loading if the ad load fails. My 2 cents