Yes, I understand what you mean. What I mean is "in other case" meaning that I use the earphones for my phone and laptop instead of just laptop. And when that one time happen, I noticed that maybe accidentally a bit of water slips into it, or my sweat goes into it because I used it when I'm doing some physical exercise. Not long after that, my earphones start giving that crackling noises, either I put it into my phone or laptop, it gives the same crackling noise. I tried to give you another example of "output audio devices", speakers and earphones are basically the same.
2 years old, or 10 years old, electronic device age can't be counted like that. In a normal daily use, maybe it will not likely to happen, but sometimes that few percent happen to some people. And sometimes we don't really know what really happened with our devices. For example a Hard Drive (HDD), Some HDD can last 10 or maybe 20 years, but mine not even 5 years, because I carry it everyday on my backpack, so there is another factor here that causing my HDD died in a young age, it's vibration. Same goes for speakers, it has some factors that can make its life shorter. So many factor, including in manufacturing process.
The focus here is your speaker problem, it doesn't care how old it is, but when its crackling, its broken, physically damaged, can't be fixed by software. If you're an expert of hardware, maybe you can fix it physically? if not, then replace with the new one or get usb or bluetooth speaker maybe? or just use your earphone?
I'm sorry, but really, it doesn't has anything to do with your software.