Triggering Keyboard Maestro macros remotely

No, remote triggers (ie, triggers using the Remote trigger) have nothing to do with the Keyboard Maestro built in web server.

The remote triggers work by Keyboard Maestro keeping a "long poll" connection to the trigger.keyboardmaestro.com web server. I would guess that some part of the connection between your Mac and the server is timing out the connection and so when the message finally comes through, it can't get from the trigger.keyboardmaestro.com web server to your Mac. If having the Keyboard Maestro web server on makes a difference, then my guess would be that the issue is local to your Mac, so your Mac is deciding not to bother remembering the connection or something like that.

I'm afraid debugging the issue or determining where the problem might lie for your network setup sounds very challenging to me.