Given your specific setup, I think it is unlikely you will get a different sound by swapping something else in for the Apple TV, unless the Onkyo reproduces 48kHz somewhat differently than 44.1kHz. In addition to the Apple TV buffering the audio data before transmission, the TV is going to be buffering it while it extracts it from the HDMI data stream, before outputting it via optical to the Onkyo.
Apple TV 4K vs Network Player for streaming via Air Play
I have all my CDs ripped to iTunes as 16/44.1 AIFF files.
I want to stream them wirelessly to my stereo
My current way of doing this is through my Apple TV 4K, connected to my TV via HDMI, with the TV connected to my stereo amp's DAC via optical cable.
Thus it's iTunes -> Airplay -> Apple TV 4K -> TV (HDMI) -> Onkyo A-9150 (optical).
Is the sound quality suffering with the above setup? Does the Apple TV 4K introduce jitter (via HDMI to the TV)? Does it upsample my 16/44.1 music to 16/48 (or is that just for movies)?
Would an older Airplay-capable network player/DAC (like the Pioneer N-50) sound better than the above setup? In this scenario, it would be iTunes -> Airplay -> N-50 -> Onkyo.
Or are there other (better) options?