How can I use wifi only for handoff?
This is quite easy.

Open wireless networking and remove the password for any/all networks you don't want to join and then toggle the Wi-Fi off and wait a dozen seconds or so before turning it on again.

The Wireless radio will be on and ready for handoff or AirDrop but not joined to any network/SSID. The computer will work fine with wired ethernet and a Wi-Fi radio on but not associated with any network that's in range.