But even if you don’t fully control the device, you can usually change DHCP DNS so that LAN clients will use your local DNS servers.
Not all ISPs allow this. Mine for instance doesn’t allow changing any LAN DHCP setting… fortunately they have an option to configure one of the ports as “bridge” and you’ll get a public IP there so I can just plug my own equipment and do whatever I want.