I haven't looked in detail but it's a bad idea to do that. Consider one Serial out going high and another goes low. At the very minimum it will attentuate the signal to nearly nothing, at the worst it could cause damage.
If you have control of the I/O mode you can sniff then change I/O , send, change I/O back to input. It's commonly used on a well-known competitor.
The usual options are:
- Diode mixing and a pullup.
- Using one or two transistors to make each node an open collector/drain (like I2C) and a pullup. One tranny is cheaper but will invert.
In any event you may still have a data clash but at least there won't be any chance of physical damage.
There are other methods but these tend to be easiest and cheapest.