They are probably doing it with a pedal. If you do it with a plug in, the easiest way would be to assign the "pedal" to a controller and turn it back and forth. That would also involve recording automation which I'm not even sure Audacity can do that.
The other thing you see if it's available. Insert an envelope and draw the adjustments for the "pedal" or filter or whatever they name it.