if you use microcontrollers with PPS (Peripheral pin select) such as the PIC24FJ64GB004 you may be able to enable the UART on one microcontroller (connect the UART to the required pins using PPS) while the pins on the other microcontroller are tristate. When data transfer is complete use PPS to disconnect the pins from the UART and tristate them. You will have to be careful not to enable both UARTs at the same time.