YES, YOU ARE RIGHT!
I'm not sure that it's squirrels that are digging at your plant if it's happening at night too.... I live in the wilds and get all sorts of creatures trying to eat anything that I put out or grow! I went the commercial Bobbex, etc. route with no results except a stinky yard (Cayote pee in a bottle).
Being a logical/creative person, I have discovered, tested and share the following: Pepper hurts anything with a mucous membrane. It doesn't kill anything, but it DOES deter them. I was battling deer, woodchucks, moles and G**-knows whatever else in order to save my gardens. I started by misting my plants with a little water and then sprinkling $1.00 jars of crushed red pepper on both the upper and lower leaves (different critters/different heights) of the plants- I was on a mission since I'd spent my whole birthday planting these things! That seemed to work okay, but I was still getting periodic chunks torn out- I then started alternating "wet leaves days" with "dry leaves days" when I would just loosly sprinkle the pepper with superb results! At first you have an orange/red garden (tell your friends, "Welcome to OZ." (or whatever!), but the animals become trained and fearful of the scent (poor things!). After a few weeks or so (if you're getting results), get the pepper FLAKES. Sprinkle them around the perimeter of your WHOLE growing area. The wild animals will smell the concentrated chips, that expand in the rain, and stay away! Animal+ Pepper=major TEMPORARY hurt
It has worked for me and everyone I know... give it a try- it's REALLY the kindest way to deal with nature!