I had the intermittent crackling/scratching noise on one of my earpieces. After taking apart, I’ve found a small potentiometer that when tapped, made the sound go away. I’ve given it a tiny turn and the cracking has now gone away. I believe this pot is wearing out and causes the scratching type issue. It makes sense as the noise is similar to a worn out pot on a hifi.