There are many solutions for this, but the normal way is to define a service for systemd.
Create a file /etc/systemd/system/my-service.service with this content:
systemctl enable my-service
You program should be executed the next ...
I'm not familiar with PiHole and DD-WRT router so I cannot say much about your specific setup. But as I see the last problem is only that the local DNS name resolver does not append the default domain to a generic host name. So lets have a step by step look at this issue.
To configure the local name resolver there is /etc/resolv.conf used. With only local ...
How come my AdaFruit thermal printer prints only Chinese characters, How
(1) The printer seems to have set to talk Chinese. Your "Hello World"
sounds rubbish to it. The printer is returning rubbish Chinese
characters. They are indeed Chinese characters, but meaningless
rubbish, not error message or something like that....
Relative to where you started, here are some issues that I think were part of your problem (and have been written into your updated question now):
The router was providing multiple DNS servers. Although your internal server was listed first, this is not a binding order of search on the router. See, e.g., https://superuser.com/questions/1177175/change-dns-...
I would try to change the domain to .lan.
This is possibly an issue with mDNS (Avahi, Bonjour, etc) that use the .local domain. It could be that Windows tries to resolve the .local domain using mDNS.
The other possibility is that the responses are rejected due to lack of DNSSec.
Try to use nslookup router.local and nslookup router.local 192.168.2.10 on ...