The ripple waveform for a given code is known. Why not S/H the filtered PWM waveform, sampling at the precise time the waveform is/will be at the correct voltage for that code?
That is, effectively, adaptively sample the ripple 'ramp' in lieu of PWM 'boogering.' Sort of the opposite of a time-to-digital converter.
Even a first-order filter settles to zip ripple, quickly.
Cheers, James Arthur