For a more battle tested solution, I recommend trying ESPHome - <a href="https://esphome.io/" rel="nofollow">https://esphome.io/</a> - it supports MQTT as well as many other protocols.
Small and sweet. Will give this a try.<p>For big and broad, try <a href="https://github.com/arendst/Tasmota" rel="nofollow">https://github.com/arendst/Tasmota</a> - I'm using MQTT to home assistant with some Athom devices and they're perfect for no-cloud, low work iot.
I build an MQTT controlled tank using ESP32 controlled using an Android APP controller.<p>This is the link in case you would like to heck it out: <a href="https://github.com/MihaiLupoiu/RC-Tank" rel="nofollow">https://github.com/MihaiLupoiu/RC-Tank</a><p>The code in ESP32 is done in C but tried my best to make it modular as possible for future components.
No affiliation with these guys, but if you're looking for a good Ethernet/PoE ESP32 board, I've been liking these: <a href="https://wesp32.com/" rel="nofollow">https://wesp32.com/</a>