The rule of thumb is to keep Wazuh server close to the infrastructure it monitors (on the same segments), regardless of where that is (cloud or or on premise).
OSSEC uses udp for communications between agents and servers, and the connection is always initiated from agent to server, after which the server reaches back to the agent. Usually UDP communications are one way, with no guaranteed delivery. So any intervening routing/firewalls may wreak havoc with communications between agent and server. Even though OSSEC communicates over UDP, at the application layer the agent and server 'synchronize'. After an interruption in agent-to-server communications, upon resumption the agent should pick up from where it left off. It however does not queue.
Best practice is to deploy as many Wazuh servers as you have locations to monitor, and use FileBeat to ship Wazuh logs to a central ELK cluster.
Theoretically, such a such a distributed setup would elegantly scale from the smallest of deployments (all-in-one if you only have one location, though for production it is best practice to have a 2-node elasticsearch cluster) to the largest (mix of on-premise and cloud infrastructure with multiple geographic locations).
Few security information management solutions are as flexible or scale so elegantly.