Apple took over port 5000 in the latest macOS
old.reddit.com
old.reddit.com
"Just did a bit more digging, and IANA actually assigns port 5000 to "commplex-main" - so really any other service that's using that port is violating the official assignment. Based on a quick search of what commplex-main is, it's related to UPnP for network device discoverability. I'm not sure exactly what the AirPlay Receiver service does, but I get the gist that it probably does fit somewhere into the scope of UPnP-related features. At the very least, it's probably a far more accurate usage of port 5000 than some random dev servers."
So looks like they are actually IANA-compliant. Baseless rant.
So, yes, stick to 8080 and friends. There is a reason for this.