Unfortunately, the trick supposed in this thread work only for playing streams, but not for publishing. RTCPeerConnection ontrack event handler fires when stream is added to RTCRtpReceiver, but not RTCRtpSender.
And, for playing streams, this is already done.
So using muted audio seems the only...