There are good and long standing algorithms used in Ethernet - when more than one writer is trying to write to the bus at the same time a clash occurs. Both writers backoff for a small random time. The backoff increases in time after each successive clash (up to a limit).
Maybe it’s the relay that can be responsible for having an optional “heartbeat”. It’s used all the time in device networks. Relay sends to other relays a signal when it comes back online, so a client sees when it’s active again when communicating with an up relay.