Some points come into my mind:
potentiometer linearity:
For a common pot in the 1% to >5% range depending on type, so a calibration would make sense. If not build for angular or length sensing, the end points can be very nonlinear .. one idea would be to use a 10 turn precision potentiometer, even if you only use a fraction of it, the linearity is usually speced (and better) and I assume the resolution is limited by mechanics anyway 😉 (hysteresis, friction)
input impedance of the 9215:
if you habe the BNC version the input impedance is 200k Ohm, that influences your measurement.
Spikes:
Dust on pot and/or wiper lift-off (speed and dust) ? Or spikes on the 5V ?
Depending on the dynamics of your measurement, filter can help, I would try a median filter against spikes and a mean filter over at least one line frequency periode if possible.
So an individual calibration would be recommended, depending on the result, make a fit with an apropriate polynom or a lookup table with interpolation.
I have never seen a non broken/abused/burned/dirty potentiometer with a non monotone output. Keep in mind that potentiometer are build for quite rare use. Industrial potentiometer sensors have a price for a reason 😄
Finally, since you measure a voltage ratio, it's alway a good idea to measure both voltages ; ) so if you have a spare channel, measure pot supply and wiper output.
Greetings from Germany
Henrik
LV since v3.1
“ground” is a convenient fantasy
'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'