https://adguard.com/en/adguard-dns/overview.html
Note that obviously since you are sharing all your dns requests with them, it's terrible for privacy... :'(
Right. I'm not defending this service in any way, but couldn't you say the same about Quad9 or Cloudflare?
You could set up pi-hole as a recursive dns server: https://docs.pi-hole.net/guides/unbound/ That way you don't have to use a public dns server like Cloudflare. However, since (as far as i know) dns requests are not encrypted, this is not perfect either (security wise).
At least when using Cloudflare you can use DNS-Over-HTTPS: https://docs.pi-hole.net/guides/dns-over-https/
Out of curiosity, do you have any idea how they prevent the scenario I outlined (e.g. metadata, traffic analysis)?
I tried to set this up on my own using a VPS and Pi-Hole and it did work for a while. However, bad actors eventually found the server and started using it to perform DNS amplification attacks against, of all things, cricket news websites. I don't know too much about networking, so this may be a limitation of the DNS protocol. However, it seems like Quad9, Cloudflare and the like have figured out a way to prevent this sort of abuse... So, if any provider out there is reading this, please add this capability and I will gladly pay to use your DNS service.