Spray of 223 or 5.56 will do it.
I don't know if any spray to keep rats away.
Tomcat sells some, but I don't know of it's effectiveness.
Get an exterminator to deal with the rats.
And if you can't do that, get a seaboard container to store the tractor in.
neighbor had a grain drying facility. Learned to shoot by sniping rats with a Pumpmaster 760. So long ago that bb gun had wood stock and fore grip. Or just get a small animal live trap.
I had rats chew into my UTV wires. I repaired them and used "rodent anti-chew deterrent tape" (do an Amazon search). I also put out some poison rat chunks in dog/cat proof boxes. So far, that has worked.
I’ve never found sprays, moth-balls, or dryer-sheets to do anything but Waste My Time.
The only Sure-Cure I’ve found has been Tom Cat blocks scattered around th place in hidden corners and walls where my dog can’t get to ‘em.
It really did end my rat/mouse problems out here on the ranch.
(But I found a very lethargic porcupine one day in the hangar. I picked him up and moved him outside using a shovel, but he died next day. I felt bad about that.)
No “rats” here! Only mice and chipmunks…dryer sheets have worked for years!
Maybe your rats would use the dryer sheets to wipe their a$$es after eating your wires!