Stabilizing a potentiometer.

That's probably not the potentiometer's fault. It's probably the ADC's fault, ADCs aren't perfect and may vary by a few LSBs. So the only thing to do in this case would be software averaging.