Since you can change a variable with the encoder, make yourself an array of, say three bytes. They will have indices of 0-2. Limit your encoder-controlled digit variable to these numbers. When digit 3 (index 2), for example, is selected switch to digit vary mode with the encoder pushbutton.
In this mode the encoder varies the array member selected in the digit select mode. When the digit is at the desired value, switch out of digit vary mode and update the actual variable by some means as described in post #3.