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 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 ... with more GPIO pins than the RP2350A ...