It seems that at some point, when upgrading to a new version, Pi-hole arranged to read /etc/pihole/custom.list, and move it into /etc/pihole/hosts. This file is now automatically updated if you fiddle with the web local domain interface. I presume that the intention is to provide an easy source for /etc/hosts. The local DNS names are now stored in /etc/pihole/pihole.toml, initially loaded when the custom.list file was moved, but which is now only changed by the web interface.
I now have about 40+ systems that I want to name and number on my local network, some are computers, some are WiFi routers for the local WiFi, some are Tapo plugs etc etc. I really don't want to have to type all these names one at a time into a web interface. When a name disappears, I don't want to have to remember to remove it.
I support my local network from a local authoritative DNS server assisted by DHCP, both running on my gateway machine. Pi-hole is only used as a blocking DNS that some machines see. When Pi-hole was new, I could extract the necessary information to make custom.list and load it into Pi-Hole. I’d like to be able to do that again.
So what I've done as a work-around is write a simple editor in Python that replaces the relevant part of the pihole.toml file with data from my DNS, which is the essentially the custom.list file. The editor takes a copy of /etc/pihole/pihole.toml, checks that a change is needed, and inserts the revised information in the appropriate place in the file. My editor follows the layout in pihole.toml, so a diff can be run to see what changes it has made before installation. After replacing /etc/pihole/pihole.toml, it seems that something notices, wakes up, reads it, and writes it back again. It incorporates the contents into the Pi-hole nameserver, and also updates /etc/pihole/hosts/custom.list. I presume this functionality assists the web interface.
Now, I would much rather have Pi-hole provide me a 'legit' way to do what custom.list did when Pi-hole was newish. I would like to suggest that one of the pihole or pihole-FTL commands is given a new option to replace the local DNS names from a list in a file putting back the ability to load Pi-hole local domains from a file.
Of course, I could be completely wrong, and there is a way to do what I want, I just haven't found it.