How do I populate the /etc/hosts file via the AEP GUI/DeviceHQ config?

NOTE: AEP doesn't really touch the /etc/hosts file. Any changes to /etc/hosts will persist through reboot, but the changes will be overwritten on firmware upgrade.  

The way DNS is handled on Conduit with AEP is that dnsmasq is listening on the DNS port on localhost. The /etc/resolv.conf file directs DNS queries to 127.0.0.1. The dnsmasq configuration gets generated in /var/run/dnsmasq_dns.conf and will point to the DNS server(s) configured through the AEP web UI or API. So, DNS queries usually go through that mechanism. You can, however, configure entries in /etc/hosts and they will take effect.