ESP32 with Pixhawk 5x

I am new to drones and am working to build a system that has an onboard ESP32 microcontroller for the management of various servos and sensors. I would like to be able to transfer data between the ESP and flight controller, so I figured the UART port on the 5X would be convenient. What is sent on that port by default and how can data received there be passed to the telemetry radio? Any data protocol that must be adhered to? Is this something that is controlled with external software?

Thanks