Anything is possible, but this may be not a good idea.
It would obviously be convenient, but I think there is a risk of getting out of step, meaning that the pedal will not do what you expect. Meaning, you hit a switch expecting the effect to sound, but instead it goes off – you may not immediately notice the problem.
Probably better if a command does the same thing every time.