Assuming that dnsmasq runs on the IOT device:
Your approach cannot work. As soon as a mobile phone is connected to a WiFi, it assumes that this wifi has an internet connection. But as you say, your IOT device / WLAN has no internet connection, so any attempt to reach an alternative DNS would fail.
The solution to your problem would be to simply configure ...
TCP works over IP and IP has no notion of host(names) but only of IP addresses.
As such, TCP knows also only about IP addresses, not hostnames.
If you want to have something handling hostnames you need a protocol on top of TCP (ex: HTTP, SSH, etc.) or translate names to IP addresses before using TCP, as the DNS is typically providing.
Or you need your "...
You are logging everything twice because logging is configured twice.
In particular, the PowerDNS unit by default doesn't log to syslog:
Additionally, the Recursor can log to syslog on these systems. Logging to syslog is disabled in the unit file to prevent double logging
whereas you set --disable-...