Wrapping your wiring harness in capsaicin tape works pretty well. Unfortunately, this is a discovery I made after multiple annoying and expensive repairs.
Chickens ate our environmentally friendly AC line insulator wrap. They won’t touch the cheap gray stuff, at least not after I wrapped it in foil tape.
(They can’t taste capsaicin, though now that I know that exists, I’ll pick some up for other projects!)
Yeah, I went with spray and a monthly reminder to stalk the entire premises for The Enemy, but same idea.