The other approach is to switch to the frequency domain, and try to rebuild regions that are too hot using interpolation from surrounding frequency blocks. This "reconstructs" the signal. However, it's a heavier filter that would do more harm to the signal when there's no clipping. Also, from my listening to the declipper samples, I didn't really like the results much (loudness pulses, etc.).
I actually don't like the results I got from Perfect Declipper with music - but if you look at the "extreme clipping" sample, it shows a significant improvement. (and I suspect most of their samples are "turned up to 11" to make the difference obvious)
I still wouldn't listen to music that had been clipped to that degree, but if a podcast or a recording of a live show that I want to listen to is clipping badly - which is what got me looking into this - a declipper can make the difference between the audio being grating to listen to, and
relatively OK.
I downloaded the trial of iZotope RX2 today (a friend uses it in video production and recommended it) which gives you the option to set a hard threshold (I found -0.3dB to work best) rather than trying to analyze the music, and while it may not be as good as a well mastered source, if your only option is a clipped CD, it seems to make the difference between it being fatiguing four tracks into the album, and being listenable all the way through.
Because you can set it to only work on samples that are -0.3dB or louder, it won't touch well mastered music at all (unlike Perfect Declipper) and typically if something is that loud, it's
probably clipping - or just about to.
It's a far more subtle/cautious approach than Perfect Declipper that maybe won't give you as good results if you've spent a lot of time tuning it for a specific track, but it seems to work well with everything I've thrown at it so far, and doesn't interfere with properly mastered tracks - which is important to me. I want something I can just leave running without thinking about it rather than having to play around with controls all the time. (Perfect Declipper has far too many variables and not enough documentation)
From what you describe, it seems to use the first approach, or a hybrid approach that primarily only touches samples that have been flattened. If you set the threshold too low, it will start to affect other samples and sound terrible.
But because you have to set that hard limit at (for example) -0.3dB, you won't be able to use that if ReplayGain is working.