I have done some testing. If I use Logic Pro, the crackle/pop issue is extreme. You can't really use the software anymore because the sound coming out from the speakers are completely distorted or it sounds like you are using tremolo on all sounds. Anyway, if i switch from mac built-in speakers and route the audio through another application like Loopback and then use Loopback to send audio to built-in speakers, the problem changes. I get rid of the crackling and pop, but instead i get some kind of echo, and the delayed sound is a weird, distorted version of what i play.
I have no idea what this means though. Have tried calling Apple Support, but always end up teaching the support staff some stuff about macs. They are completely blank. Have tried to convince them to put me over to tech staff, but with no luck.