When a replica wants to help in an export operation, it must first lock a given part in zookeeper. The lock is ephemeral, meaning that if the server loses connection with zookeeper, the lock is automatically released by zookeeper.
This leads to the following situation: replica1 locked part1, started streaming data to S3, briefly lost connection, the lock got released, replica2 acquired the lock and started streaming.
There should be a callback somewhere in StorageReplicatedMergeTree that allows one to take action upon connection loss.