Yes, but if you take a look at this, you’ll see that there are many ESP32 pins that are suitable for use with relays:
But of course there’s nothing to stop you using an ESP32 and one of more MCP23017s.
I did a few experiments with MCP23017s recently and wrote-up some of my findings here: