This circuit worked, but have problemsA microcontroller would be simplest.
Otherwise you need an up / down counter a digital potentiometer, and a PWM dimmer. The micro would do all of these functions plus debouncing the switches. And would replace your 4017 as well.
I've read that the capacitor should be ac capacitor, so will try and see

