The ESP32 microcontroller is a popular choice for DIY home automation and sensor projects, succeeding the ESP8266. Some users have reported connectivity issues with their ESP32-based devices, despite switching out power supplies. Various “superstitions” have emerged to keep the microcontrollers connected to WiFi, such as disabling power saving mode, setting the APs to 20 Mhz wide channels, and pinning the ESP32 devices to a single AP. While these workarounds are anecdotal, they have helped maintain stable connections for many users. By implementing these tips, connectivity issues with ESP32 devices can potentially be resolved.
https://supakeen.com/weblog/esp32-wifi-superstitions/