Normally, you wouldn’t be able to do that without extra parts, but on the ESP32, [BastelBaus] has found a nice hack — just connect your devices to different pins and slightly abuse the ESP32 ...
We usually require more pins, but if medium-sized ESP32-C3 modules are priced near the ESP8266-12-style modules, we can’t see any reason to buy the latter; for us it will literally be an ESP8266 ...
We made something similar but using the RP2350A board, the Raspberry Pi Pico 2, and published a guide on how to get Wi-Fi on the Pico 2 using an ESP32 ... for only 30 GPIO pins while the RP2350B ...