ESP32 I2C pin routing
According to Section 4.2 the ESP32 datasheet, any GPIO pin can be configured as an I2C pin. There are two I2C interfaces (I2CEXT0 and I2CEXT1), and they can operate in either master or slave mode at up to 400kHz. Just make sure you don't use any pins that your module uses for another purpose. For instance, some ESP32 modules have status LEDs or external level-shifting circuitry.

As mentioned by @jDAQ, the IO_mux and GPIO_matrix registers can be used to "rewire" the peripherals.