In case you didn't already know, there's a clip connector that just needs a gentle press to release the switch, no force needed.
Also when inserting the new switch it can be twisted into place at varying depths so that the brake pedal activates the switch even with the lightest touch on the brakes.
Sometimes if it's placed fully seated, when the brake pedal only travels a couple of mm it's not enough to activate the switch.