All devices are on latest software (no betas).
The problem is that when I stream Airplay audio from Plexamp on my iPhone to my new Apple TV 4K, the audio cuts out frequently for several seconds at a time (at least once per song). The connection is Apple TV → HDMI → HiSense U6 TV → Optical Out PCM → Optical In of Onkyo receiver.
But when I stream Airplay audio from Plexamp on my iPhone to my old Airport Express, the audio never ever cuts out. The connection is Airport Express → Optical Out → Optical In of Onkyo receiver.
Both the ATV and AE are on the same WiFi network and the same distance from the router (about 4 feet). It’s also the same network as the PC that hosts my Plex Server, which is connected to the router via 1Gbps Ethernet. I cannot think of any technical reason why the audio would be dropping out on the ATV but not the AE. On the Plexamp end, the audio appears to be playing continuously (it’s not pausing or buffering). It’s just that for several seconds, randomly and frequently, no sound comes out of my speakers. There are no other services using my network at the time (nobody streaming 4K movies from Netflix or whatever, or saturating the network with a file download).
It does appear to be a Plexamp problem, because I don’t have any dropouts when streaming songs from Apple Music on my iPhone to the Apple TV. I can stream Apple Music through the same system for hours without a blip, but Plexamp starts dropping audio within the first few minutes.