Octoprint container with ESP8266(arduino) like remote GPIO to control printer

Hi,
I'm using a raspiberry pi 3, but thinking if is possible use my home server with truenas scale and Octoprint in a container and conect my printer in a arduino board with wifi like Wemos d1 mini or other to work like a remote GPIO, using leds, power off relay, temperature monitor and maibe control printer or conect printer by cable usb to server and only GPIO resources by with

Has any ideia how can make this ?

if you flash Tasmota on an esp8266 device you can use my plugin to control those, and if there are humidity/temperature sensors it will collect that data and graph within OctoPrint.

it wouldn't allow the connection to the printer though. you could flash esp3d and then use this plugin to connect to it over the network.