ESPHome connected sensors constantly showing as 'unavailable'

Just wondered if anyone has any ideas why this might be happening. I’ve bought quite a few ESP32-POE devices which I’m powering by ethernet and also using ethernet for communication. I thought this was going to be a real winner of a strategy for reliability but I’m noticing that the sensor periodically stops responding to MQTT commands and if I look at the HA logbook it shows all of the sensors/states connected to that ESP32-POE node running Esphome constantly going ‘unavailable’. Sometimes it’s only for a second but annoying sometimes they’re much longer, like a few minutes.
Tearing my hair out. Help anyone?!
Thanks

EDIT: I’m wondering if it’s because I have both the API and MQTT enabled? Could that be it? Seems to possibly be a no-no for Esphome?

Only a problem if you are not using the api.

Warning

When enabling MQTT and you do not use the “native API” for Home Assistant, you must remove the api: line from your ESPHome configuration, otherwise the ESP will reboot every 5 minutes because no client connected to the native API.

Yeah I guess I am using the native API. And actually my device is reconnecting a lot more frequently than every 5 minutes. As an example

13:01: Socket error on client TrafficLight, disconnecting.
13:01: New connection from 192.168.2.24 on port 1883.
13:01: New client connected 192.168.2.24 as TrafficLight (c1, k15).

13:03: Socket error on client TrafficLight, disconnecting.
13:03: New connection from 192.168.2.24 on port 1883.
13:03: New client connected 192.168.2.24 as TrafficLight (c1, k15).

13:06: Client TrafficLight has exceeded timeout, disconnecting.
13:06: Socket error on client TrafficLight, disconnecting.
13:06: New connection from 192.168.2.24 on port 1883.
13:06: New client connected 192.168.2.24 as TrafficLight (c1, k15).

13:23: New connection from 192.168.2.24 on port 1883.
13:23: Client TrafficLight already connected, closing old connection.
13:23: Client TrafficLight disconnected.
13:23: New client connected 192.168.2.24 as TrafficLight (c1, k15)

:sob: