This is something I've tried myself, and it's not trivial. Digipots won't work in the signal path and are noisy and imprecise, so companies that do this (there are very few!) like Chase Bliss use vactrols. Using those precisely is still tricky, as pot values in many circuits are all over the place and have different tapers, whereas most vactrols have a voltage/resistance curve that looks more logarithmic.
Would love more information on this, as it's a topic that's difficult to research.