OK, so you have been trying different things to confirm it's probably something going on with your phone. Since this just started happening recently, the next thing to suggest is have you just restarted your phone? If the problem still occurs after a reboot at least that eliminates a one-off glitch and there's still something that needs to be addressed.
Of course that's just coming at the problem from the opposite direction, you're assuming it's a hardware issue, I'm assuming it's a software issue. But since it could be either one. Still puzzled as to why the sound is good without Quad DAC enabled but now sounds bad when it is.
Does this happen using a particular app or with several? (leaning back to a software issue)
That issue where there's a static noise when you rotate the headphone plug does indicate a hardware issue though. I'd try getting some electrical contact cleaner and give a squirt into the headphone jack. It's typically comes in an aerosol can, and it is nasty stuff -- lots of toxic chemicals in the ingredients list with long, multi-syllable names so use it in a place with good ventilation and not around little kids. But it does a really good job cleaning the metal contacts in things like switches and things, and when it dries leaves very little residue. (A headphone jack is one of the few things in a smartphone with a moving part, there's a spring-loaded metal contact towards the bottom, side edge.)