I think it's almost a given that pests might dislike hot peppers and I wouldn't discourage anyone from at least trying a humane deterrent. I think I'd try dust variety black pepper for such a task.
I've watched groundhogs select and maul cayenne peppers leaving my milder jalapenos undisturbed. I'll assume it's in the flower, not the taste buds. The cayenne's were the preferred offering. They ate the fruit from the cayenne before assaulting the plants which came after fruit was depleted. Bells and jalapeno undisturbed.
No time or funding for a scientific study, but more than casual observation. My latest cayenne's are slightly protected by fencing and a lower population of groundhogs but if I find them eaten upon I'll be quick to judge and cast (temporary) blame.