I would separate the 48V device completely from the Duet to avoid any damage. If it's a laser, one has to control the current with a separate laser driver anyway to limit the current to avoid damaging the laser. To turn on/off or other control, I would use one of the communication protocols and lines to the Duet. To be sure, an optocoupler can be used.