pcb trace to act as a potentiometer?
How much room do you have on the PCB? You could make a meander out of thin (1/4oz?) narrow copper traces, and have heavy pads for the slider/brush to contact. The narrow lines are covered in soldermask to protect them (not shown).

Then you do a 4-wire measurement of the resistance of the meander. You drive current through the meander at the &quot;I+&quot;, &quot;I-&quot; lines, and the brush taps off the V+ (using V- as reference). You need a lot of current, and a sensitive milliVoltmeter.