Update #3: I've tried Superlux headphones suggested by Jokeyman (HD681), and they indeed have better sound on PX-160 than my M40X. Treble notes sound just amazing, especially if you set +1 or +2 brilliance in settings. Bass is more or less the same as in M40X, maybe a bit less detailed, but overall sound is much more alive and pleasant, so now I'm completely satisfied. I gave up on trying to understand what's the deal here, I'm just gland things have worked out for me.
P. S. I'm still using line outs on the back though, not headphone jacks, it's still noticeable that line outs have better sound quality.