NOTE-1: Your Marantz AV7704 supports 8 HDMI inputs. Can you output the Apple TV HDMI signal direct to your Marantz AV7704? This unit has many input options that might solve your problem. Please review......
NOTE-2: As posted above, I also take the optical output from my LG OLED TV to my DAC and then to my DAC. Unfortunately, as the OP posted, your Apple TV 4K only has HDM meaning you cannot get the Apple TV's audio signal to the Ayre QX-5 to decode music from the Apple TV.
I have never used an HDMI to Optical converter and do not know if this might help you. In any case, the Comprehensive 4K HDMI Audio Extractor allows you to de-embed audio signals from up to Ultra HD 4K HDMI video sources and output them via digital optical or analog stereo L/R audio outputs. The unit "Supported audio formats include LPCM 2-channel, Dolby True HD, Dolby Digital Plus, Dolby Atmos, and DTS-HD Master Audio". Please see this link:
https://www.bhphotovideo.com/c/product/1385810-REG/comprehensive_cpa_hda3_4k_18g_hdmi_audio.html/?ap=y&gclid=EAIaIQobChMIloOho6Sb4QIVsyCtBh1X-A-bEAQYBCABEgKYCfD_BwE&lsft=BI:514&smp=Y
Assuming the above works, you could output the audio from your Apple TV to your Ayre QX-5 DAC for 2-channel stereo only (you need to adjust the TV settings to support this).
I also recommend you "use the analog balanced (XLR) output from the Ayre QX-5 to the AV 7704 since it would be a better choice for audio quality. My DAC is connected using its balanced XLR outputs to my Integrated Amplifier.
I am hoping someone else can confirm the above will work and maybe post some additional suggestions.
I also have an Aurender N10 Music Server and use BOTH its USB and AES/EBU outputs to my DAC. IMHO, most music sounds better using the N10 AES/EBU connection to my DAC.