Referring to the OG topic the switch node will ensure the count is linked to highest index and you can know the end of the split. Your problem is about order, it could be sorted after the join with a sort or queue the messages.
I wasn't recommending one approach over the other, merely pointing out that - depending on the OP requirements - Node-RED has you covered.