UART0
The ESP32 can be programmed via its UART pins. However it doesn’t have to be if you want to use them for something else. It is also possible to program it using the JTAG interface pins.
Pin assignment (other than UART0)
UART signals can be connected via IOMUX for specific GPIO or otherwise the GPIO and signal will be connected via the GPIO Matrix. So connecting to any of the pins is possible (ensuring for output signals the GPIO pin can output). See the series datasheet for your device to confirm.
