Oh do I have a treat for you, check out DNSWeaver.
It's designed to do exactly that, to automate creation of DNS records for container services. I use it with Traefik. It reads from the same labels that Traefik already uses to proxy services but if you already use another reverse proxy and don't want to switch it supports dnsweaver-specific labels as well which are easy to add to your current deploys.
I used it both with pihole and technitium and actually used it to make the migration easier. Great tool.