Here is my take on a solution.
I have sort of made the entire flow.set and flow.get function into my list, because I simply create a new variable and set it to 0 when a sequence start with the variable name containing the timestamp of the start.
The timestamp is always forwarded to the following nodes, so they know what timestamp the sequence started and what flow variable name to relate to.
When a light/sensor/whatever finish its part, then it increase the value of the flow variable stored.
After the value have been increased the next node checks if the correct value has been reached for a complete sequence.
If not, then it just dies there, but if it has then it continues and make a final presentation.
To test this I used 4 random delay nodes as light/sensor/whatever.
This works great, but the higher number of nodes in the sequence gets the more stable the result gets, so if you would like to really see fluctuations, then lower the number of nodes in the sequence.
The chance of a sequence getting all low delays are bigger with only 2 nodes, than with 4.
Increasing the random delay to like 30 seconds also helps seeing the results better.
[{"id":"8f587dd245b5fd29","type":"inject","z":"be03f9025a1f137a","name":"Send timestamp","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":210,"wires":[["512543cb0e3ef013"]]},{"id":"512543cb0e3ef013","type":"function","z":"be03f9025a1f137a","name":"Create sequence","func":"sequence = 'seq'+msg.payload;\nflow.set(sequence,0);\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":195,"y":270,"wires":[["7458e1a2feabb6e1","b4ec6aafadf92033","e6ee9e90f56b3107","fff53f6a97bf533f"]]},{"id":"e6ee9e90f56b3107","type":"delay","z":"be03f9025a1f137a","name":"Random delay (1-10sec)","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"10","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":455,"y":180,"wires":[["bc62bac9c79cc935"]]},{"id":"7458e1a2feabb6e1","type":"delay","z":"be03f9025a1f137a","name":"Random delay (1-10sec)","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"10","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":455,"y":240,"wires":[["b2e1a219cbf3d74b"]]},{"id":"b4ec6aafadf92033","type":"delay","z":"be03f9025a1f137a","name":"Random delay (1-10sec)","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"10","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":455,"y":300,"wires":[["097ff3dd4446e21c"]]},{"id":"fff53f6a97bf533f","type":"delay","z":"be03f9025a1f137a","name":"Random delay (1-10sec)","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"10","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":455,"y":360,"wires":[["00a75a23df201e0f"]]},{"id":"bc62bac9c79cc935","type":"function","z":"be03f9025a1f137a","name":"Increase sequense counter","func":"sequence = 'seq'+msg.payload;\nflow.set(sequence,flow.get(sequence)+1);\nmsg.sequencecounter = flow.get(sequence);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":180,"wires":[["9aa7ee5c345dabda"]]},{"id":"b2e1a219cbf3d74b","type":"function","z":"be03f9025a1f137a","name":"Increase sequense counter","func":"sequence = 'seq'+msg.payload;\nflow.set(sequence,flow.get(sequence)+1);\nmsg.sequencecounter = flow.get(sequence);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":240,"wires":[["9aa7ee5c345dabda"]]},{"id":"097ff3dd4446e21c","type":"function","z":"be03f9025a1f137a","name":"Increase sequense counter","func":"sequence = 'seq'+msg.payload;\nflow.set(sequence,flow.get(sequence)+1);\nmsg.sequencecounter = flow.get(sequence);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":300,"wires":[["9aa7ee5c345dabda"]]},{"id":"00a75a23df201e0f","type":"function","z":"be03f9025a1f137a","name":"Increase sequense counter","func":"sequence = 'seq'+msg.payload;\nflow.set(sequence,flow.get(sequence)+1);\nmsg.sequencecounter = flow.get(sequence);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":360,"wires":[["9aa7ee5c345dabda"]]},{"id":"9aa7ee5c345dabda","type":"switch","z":"be03f9025a1f137a","name":"Check sequence counter","property":"sequencecounter","propertyType":"msg","rules":[{"t":"eq","v":"4","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1010,"y":270,"wires":[["0cec77b21f2e8b3a"]]},{"id":"0cec77b21f2e8b3a","type":"function","z":"be03f9025a1f137a","name":"Present final result","func":"msg.starttime = msg.payload;\nmsg.stoptime = Date.now();\nmsg.difference = msg.stoptime-msg.starttime;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1065,"y":330,"wires":[["98abc8a16634adfc"]]},{"id":"98abc8a16634adfc","type":"debug","z":"be03f9025a1f137a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1235,"y":330,"wires":[]}]