Nowadays, the digital potentiometer is available. The digital potentiometer is effective to replace the mechanical potentiometers in a number of areas because it has FET  switching under digital control and resistive ladders. The digital potentiometer can be used as a stereo volume control, but there are a some issues which must first be addressed. Here is the schematic diagram of digital potentiometer:

How Digital Potentiometer Works circuit schematic

The most commonly available types has resistive increment that are equally weighted so it called effectively ‘linear’ pots. If the digital potentiometer is used in an audio volume control, the design must emulate A reasonably constant ‘dB-per-step’ law ‘log’ behavior in some way. The digital pot steps are usually designed to give equal value resistive increments.  The product of the process variation is the total end-to-end resistance varies widely from part to part. So, when designing a circuit requiring close matching between 2 channels using separate digital pots, we must consider the value resistive increments. A make-before-break  wiper arrangement should be considered mandatory due to the transitions that should be as glitch free as possible. [Source: MAXIM Application Note]