If you search the web for ESP8266 and external antenna, you will find a few write-ups from people who have done that.
I too have a delta printer with the Duet under the bed, but I have the wifi antenna poking out through a slot at the side. See https://www.thingiverse.com/thing:965396.