I am probably a physicist first and a chemist second. In either field, if you do a well designed experiment your model should probably explain at least 90% of the variance in the data, if you have the correct model. In biology, even if you have the correct mode, it always seemed like you model might explain a bit more than 50% of the variance. So, there always seemed to be exceptions to rules.
My biggest problems are deer related, and so that is where I have been looking the most.
There are lots of lists of deer resistant plants, often for differing definitions of resistant. And the definitions can depend on location.
Some plants are physically uncomfortable to eat. Pines and spruces are both conifers. A spruce needle being short can inflict more pain than a pine needle, mostly because the Euler buckling load for the spruce needle is larger due to its shorter length. And lots of plants have spines, hair, needles and other things along this approach. The long spines of a honey locust probably won't bother a squirrel much, but there may be circumstances where they might impale themselves on a spine. I've got some young hawthorns (all English I think) that are maybe 2 foot tall. None seem to have anything remotely like a thorn yet, so they can't protect themselves from a deer at this point. But I don't think they could ever protect themselves from rabbits or mice girdling trunks. Growing roses under them might help against rabbits, probably mice wouldn't even notice.
Another physical reason for a plant to be resistant, is because it is sticky. Stickyness brings a bunch of problems, but the ability to "sneak" around is often compromised if things get stuck to you.
A whole bunch of plants are "deer resistant" for some chemical reason. If you eat something and develop bad breath or flatulaence, predators will probably be able to find you more easily. So, that explains much of the aromatic plants.
Hot peppers (capsaicin) are difficult for most animals to eat, but birds have on ability to even detect those compounds, let alone them bothering them.
But a big chunk of these chemical defences are various kinds of poisons. Deer tend to not to eat a single plant to death (unless it is very small), they take a bite here and a bite there. But probably as important, deer will eat wood (cellulose) and cellulose ends up having a huge specific surface area at some point, and it any poisons are present in the stomach, they will tend to adsorb on the surface of the cellulose and get carried through. Another thing that deer eat is clay, and the same thing happens (clay has a huge specific surface area). Saponins are a common class; they are soaps. Some are also poisonous. Another class of compounds are glycosides. Plants are sugar factories, and attaching things to sugars to produce glycosides is a natural thing to do. Some plants also produce an enzyme to react with some of these glycosides, to enhance their use as a defence. So, we have Allium, horseradish and others, which have enzymes which react with glycosides to produce potent and often aromatic compounds which are in some sense very spicy. Cyanogenic glycosides are related, except that they reacto witht eh enzyme to release HCN gas (cyanide).
Alkaloids are nitrogen containing compounds that typically taste bitter (one of our primary taste sensations). There are lots of alkaloids we recognize: caffeine, cocaine, nicotine. My Mom is needing a change in medication, and somehow I came across strychnine, brucine and some other relaed alkaloids. In some senses, strychnine and caffeine act in similar ways, strychnine just happens to have a much more pronounced effect. They are glycine antagonists, at least in part. They bind to neuron receptors that normally glycine interacts with. Pretty much all animals are affected in the same way and to similar concentrations of these alkaloids in a glycine antagonist toxicity problem.
Can robots help with some of these smaller critters? Maybe. If we have conifers around, it might be economically feasilble to make an "adhesive" based on rosin to put in robot controlled squirt guns, to spray critters. I've seen plans for this sort of thing with respect neighbour's cats coming into gardens. If the animal in question senses capsaicin, then adding some kind of hot pepper sauce to the adhesive makes sense. Adding a soap (saponin) could also work. Nobody likes to eat a bar of soap, and if you have to lick a sticky substance off of fur, you will eat a lot of it.
I think there are plant seeds which "rattle". Squirt an adhesive and throw some rattle seeds in that direction, and whatever you sprayed will be making more noise on the way home than they want to.
But you probably can't add any old thing to your adhesive. Too many liability or legal issues can come up. Sticky and rattles probably works, sticky and hot sauce probably works, sticky and sand probably works, sticky and soap might work. Astringent? Sticky and green bananas?
Squirrels? My only dealings with squirrels relate to bird feeders, but I have observed them many times. Robotic stuff can be awfully fast. Have an angled "fence" on the bottom of a branch they frequent, and when they approach, it rotates around the branch and turns into a barrier which knocks them off the branch? Blast of compressed air to knock them off (it would have to be low enough pressure not to perforate the skin)?
In the case of bambi, most governments cannot set reasonable population density guidelines. Too many Disney people in the voting lists. Can a person regulate squirrel density? Or is this just a byproduct of predators? Some wildlife management talks about contraceptives, but I don't think a private citizen can get away with either sterilization or contraceptives.
I'm about out of ideas on this track. For now.
Paul, is the lack of water because you are in a rain shadow of some kind? I would have thought that cucumbers would have spines on the vine like squash. But it could be if cucumbers do have spines, the animal is too small for that to help. I did read about one person who had some very productive squash vines, which went up and over a trellis which went over a shed or garage. That might work for you. Or do your rabbits climb trellis like a goat might be able to do?