Ok, this is caused by the parts key in the message object, which should have no bearing in manual mode but does. I'll open an issue. I found an existing issue that seems to be about this exact problem.
Observations:
you didn't tell the join node how many messages to join.
But to send the new message after 5 seconds (I think it is seconds) of receiving the first one.
That may be a problem.
What happens if you set the After a number of message parts to 5?
I suspect you accidentally put the 5 in the wrong box.
In the picture you show of function 4 and how you send the payload.
Shouldn't it really be
return {
'payload': 'foo'
};
to be more correct as all names in JSON need to be in/between " or ' to work.
That they do without them is luck and shouldn't be done.
I think you should outline the problem you are trying to solve, then people can assist you in getting there.
Currently you are observing certain behaviour based on timing and variable/non-consistent input, not so easy to reverse engineer.