Trying to understand what you want to achieve and what do you mean by "10 in a row".
after hours and weekend, why not just setup a Status Message on your profile (I'm assuming this is to let whoever message you to know you are aware and not going to response until next business work hour).
If you must do "auto reply", did you want to reply for every message sent to you, including from the same person? (meaning, if I message you, I get the autoreply, if I message you again, I get the autoreply again, or do you want to only autoreply ONCE within ONE "period" of afterhour/weekend?
To what your current issue is, while the trigger is "when a new chat message is added", this trigger seems to provide "message" as an array. So that bothers me as to why it is an array of messages when the trigger say "when a new chat message is added" (suggesting only ONE message is added). But I tested this and even though it is an array, it is only ONE message, so your Apply to Each is not the problem. But I notice that the trigger "when a new chat message is added" applies to message you sent too, so I have a feeling this is a case of uncontrolled "recursive" calls when the action to post a message trigger the flow again to send another message, which get triggered also, etc, etc.