My 2008 GMC Sierra had the same issue: intermittent cruise control, but no problems with the brake lights themselves. Sometimes I could get the cruise to work by lifting, or tapping, or moving sideways, the brake pedal, but that only worked for a couple weeks.
Replaced the brake light switch and everything has worked 100 percent ever since.
Yup, the retaining clip can be a bit of a pain. These pix may help: