I2C expanders, or ADCs will give you plenty of pins for whatever project you have in mind. All these require extra components, though. Enter the ExtraCore library for Arduino, a software library ...
Using hardware I2C on an ESP32? Do you need to connect multiple ... [BastelBaus] has found a nice hack — just connect your devices to different pins and slightly abuse the ESP32 GPIO muxing ...