You mentioned ping. If you’re using Termux you may need to manually update its DNS settings (different from the system DNS). The file is /data/data/com.termux/files/usr/etc/resolv.conf
To make it roam you probably want your home dns first then some internet resolvers after that.
Pretty sure there’s not a per-domain setting for that. If you have HTTPS-Only Mode turned on in the settings it will always try to use HTTPS first and present a warning before switching to HTTP.
If you want to continue using HTTPS you can setup your own CA certificate to sign certificates for your .LAN domain names. All you need to do then is add the CA certificate to your trusted certificates in Firefox and the signed certificate to the device hosting the HTTPS service.
EDIT: TIL there an exclusion feature. Neat. I didn’t see this on Firefox for Android though. https://support.mozilla.org/en-US/kb/https-only-prefs