Could this handle more than two databases with this technique or would it generate the mentioned loop when a third database sends the data to multiple databases?
Yes, the implementation distinguishes between a replication client and a user/app client specifically to prevent multiple query invocations. Network latency and CAP tradeoffs still apply of course, but you can absolutely scale well beyond two instances with this.