If you just amplify the whole track until its max amplitude reaches the medium's maximum, yes you could undo that.
But the loudness war aims to make the whole track even louder than that, by quietening those max peaks so they don't clip, then that gives you room to amplify the rest of the track even further. The dynamic range of the recording is permanently reduced.
In the open metadata world there is ReplayGain which analyzes music peaks and tries to create a negative gain to equalize the dynamic range to a standard volume at both the individual track and full album level.
Apple Music, Spotify, and others have proprietary but similar systems.
(As someone who deeply loves to shuffle an entire library, having a music player that supports ReplayGain has long been a personal requirement.)