Just generate /etc/hosts from a cron job...
Pretty easy to concat, sort, and filter however you like in a short script.
You can also set up a systemd service to monitor files in a directory and refresh the /etc/hosts when they are changed.
If you are okay with a GUI on Windows, Mac or Linux, I can recommend Hozz. https://blog.zhangruipeng.me/Hozz/ No longer under development but works just fine.