So let's start with the more impactful stuff before we get down to headphones that are used several hours a day every single day for a couple years.
Not to mention Apple has an extensive recycling program for most of their products.
That is probably only true in the US given the amount of regulation on compostable bags and boxes we have now in the EU.
Secondly, e-waste is orders of magnitude more difficult to dispose of and it often contains some rare minerals that got mined in some war zone in Africa: that should give you more of an incentive to recycle than some random styrofoam container.
I think there's a trend toward seeing electronics as consumable that bothers me, and I try to think carefully about my purchases, and yet somehow I've still ended up with at least eight items that use non-replaceable batteries, and maybe others that are "disposable" for other reasons.
Still, for each item I own, I've considered the "disposable" nature and yet bought it anyway.