This is really neat and I had thought about doing this when I acquired a new Android device that I don't have root on.
Alternatively, a program was made to host a DNS process on the phone in userland that downloads blacklists as well as uses external well known nameservers. Then use build in VPN client to redirect all DNS queries through to the daemon. DNS66 has been doing a fine job since I started using it last week. https://github.com/julian-klode/dns66