The trouble with this sort of approach is that you have to:
1) measure/monitor the position of the swell pedal digitally
2) convert the digital position to a serial communication
3) have the 'digital pot' use the serial data to generate a voltage
4) send the voltage to an ADC in the MIDI encoder (just as before)
While this ought to be more reliable, and might be less noisy, than an analogue device I'm not sure it
would be worthwhile.
On the other hand I have considered (some time ago I admit) monitoring the position of a swell pedal
directly using an optically sensed 'Gray Code' approach and sending the parallel (four or five bit) digital data
to a microprocessor which is also doing the general MIDI encoding of pedals &c. I gave up on this eventually
due to the difficult of printing the code pattern and sensing the position sufficiently precisely given the usually
rather small arc the pedal moves through.
Nick