I should automate something like that too. I just have one A record pointing to my IP and all my subdomains CNAME’d to that so that if it ever changes, I just have to update that one record.
I have NameCheap as well. I was trying to set this up with the ddclient on OPNSense but the logs suggested it couldn't connect to NameCheap. What do you need to authenticate other than the DDNS passcode supplied by NameCheap?