ESP8266 can be done with an Ethernet module via SPI
But not relay an ideal solution: I don't know of any firmware supporting this out of the box (because WHY? The ESPs are great because of build in WIFI
The ESP32 has build in Ethernet support - but again nobody seams to care so the selection of possible boards is limited
I don't know of a board adding eathernet AND POE into one affordable solution (ok here is one: ESP32-POE - Open Source Hardware Board)
So again the ESP platform gives you most options to at least reasonable prices