I observe that the builtin, function neopixelWrite() (which allows you to control the on board color LED on some ESP32 development boards) breaks WiFi. This does not appear to be documented anywhere.
On my Lolin ESP32 C3 Pico board, I can successfully connect to a WiFi AP as a client using WiFi.h. I can also successfully control the color LED using neopixelWrite(). But if I make any call to neopixelWrite() after calling WiFi.begin(), the WiFi will fail to connect. I can successfully use neopixelWrite() before WiFi.begin() or after WiFi.disconnect(). On my board the color LED is on Pin 7 which should not conflict with WiFi as it is not connected to ADC2.
My guess is that as any writing to neopixels turns off the interrupts while it works, it is that which is upsetting the Wi-Fi as during that time no interrupts from the Wi-Fi can be serviced.
I would switch to the "Dot Star" LED strips as you can write to them without turning the interrupts off. Or conversely not use a library and directly bit bang them, in an interrupt free way. I have code for that if you are interested.
Grumpy_Mike: the LED in question is on my LOLIN C3 Pico board, so switching LED strips is not an option. Sure, I'd be happy to try your bit bang code to see if it avoids the WiFi issue. Thanks.