I don't want to deny that, when picking up the two & due to some trickery of your own brain, you prefer the iPhone 8, but I do doubt is that it is because of a measurable difference in audio quality.
Perhaps, but I was comparing Apple ear buds with the 3.5mm jack vs lightning ones. Presumably the drivers and whatnot would be similar. In general I don't think audio quality has ever been particularly important to Apple. The iPhone (and all smartphones really) is a jack of all trades gizmo not a device for high quality audio playback.
I remember when I had a first gen iPhone and the call quality was atrocious with AT&T compared to my RAZR on Verizon. You get used to it over time but back to back it was pretty dramatic.
"Next, you need a decent DAC such as the Audioquest DragonFly Cobalt, Cyrus soundKey or Chord Mojo 2 and a good pair of headphones, such as the Grado SR325x, Shure Aonic 3 or Austrian Audio Hi-X55.
This is just a starting point, of course. Don’t be afraid to build up to a more revealing system. You could combine the Chord Hugo 2 DAC with a pair of Beyerdynamic T1 (3rd Generation) headphones for a more premium set-up. That might be a touch overkill and punishingly transparent for an iPhone, but these are hi-res files, after all."
Oh I don't particularly care about audio quality from the iPhone, most of the time I'm using it in a noisy environment. I've a decent pair of proper headphones but there's no way I'd wear them in public.
More to the point I don't want dongles for my phone either. These are all solutions for Apple cheapening the product.
I’ve got a decent quality pro audio interface and monitor headphones. I’ve also got airpod pros. The AirPods sound much much better and I prefer listening to anything with them.