http://www.audioholics.com/audio-technologies/cd-compression-depression
https://en.wikipedia.org/wiki/Loudness_war
https://www.cnet.com/news/compression-is-killing-your-music/
There is a difference between CD and MP3 as the fast majority of MP3s are even more compressed. But CDs are compressed too.
DRC compression, while far too frequent, is a far cry from MP3.
And it’s completely in the hands of the engineer who mastered the original source.
There remain some perfect masters. It’s not intrinsic to the CD format...unlike the MP3 format.
I have a copy of Beethoven’s 9th Symphony in which there are periods in the performance that one can barely, barely hear any sound at all. But in the end it’s ear-splitting.
There are also thousands of similar rock recordings available.