You could store the true or false value of the context stored values.
and compare that to the property count of the context store for the join.
So when one wire connected it will pass every message, but as soon as you add a second with a unique topic ( and a message has be sent by the wire), then it has to receive two topics before passing. When message is sent it will set all context store trues to false, so resetting for next pass. here is an example.
[{"id":"c8f1c8ed.f36cb","type":"inject","z":"b779de97.b1b46","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"one","payload":"#undefine","payloadType":"str","x":270,"y":3100,"wires":[["9c7b1694.82b65"]]},{"id":"9c7b1694.82b65","type":"function","z":"b779de97.b1b46","name":"","func":"if(msg.payload === \"#undefine\"){\n context.set(\"store.\" + msg.topic, undefined);\n //return null;\n}else{\n context.set(\"store.\" + msg.topic, [msg.payload,true]);\n}\nlet store = context.get(\"store\");\nlet store_true = Object.values(store).filter(e => e[1] === true).length;\nlet store_length = Object.keys(store).length;\n//node.warn(store_length + \" - \" + store_true);\nif(store_length === store_true){\n msg.payload={};\n for( const k in store){\n msg.payload[k] = store[k][0];\n //node.warn([store[k][0],false]);\n context.set(\"store.\" + k + \"[1]\", false);\n }\n return msg;\n}\nreturn null;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":430,"y":3240,"wires":[["71ce21dc.3f43a"]]},{"id":"a312c696.a5b76","type":"inject","z":"b779de97.b1b46","name":"one","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"one","payload":"$ceil($random()*100)","payloadType":"jsonata","x":250,"y":3240,"wires":[["9c7b1694.82b65"]]},{"id":"35ee5dc.934a3a2","type":"inject","z":"b779de97.b1b46","name":"two","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"two","payload":"$ceil($random()*100)","payloadType":"jsonata","x":250,"y":3280,"wires":[["9c7b1694.82b65"]]},{"id":"71ce21dc.3f43a","type":"debug","z":"b779de97.b1b46","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":590,"y":3260,"wires":[]}]
[edit] fixed, had return in wrong place, and not outputting to msg. Added example of removing a wire.