Use --dhcp-hostsfile instead of container network configuration settings

Is it still possible to use dnsmasq --dhcp-hostsfile in LXD >= 3.0 instead of assigning static IP addresses with lxc config device command? If so, can someone, please, explain how to do this?

Is it recommended to use lxc config device or is --dhcp-hostsfile still a good option, if preferred?

Not generally recommended but you can set any dnsmasq option you want through the raw.dnsmasq config key on your network.