(With thanks to your grandchild) https://github.com/barre/privaxy seems definitely worth a look - thanks!
The readme goes on to say: "Privaxy is also way more capable than DNS-based blockers as it is able to operate directly on URLs and to inject resources into web pages."