Spraying natural lemon oil around the outside of the coops and covered runs as well as feeding my birds twice a day instead of leaving feeders out all day long discourages rats and mice.
Some people claim that mixing red pepper flakes with the feed can help to keep the rodents away.
		
		
	 
It isn't the lemon oil, it is hand feeding twice a day that made the rodents leave. But you are depriving your chickens of needed nutrition, slowing growth for broiler birds and limiting egg production for layers.
There have been studies on lemon oil and other aromatic oils on rodents but they tend to test if the rat prefers to stay in one nest box over another if one of the nest boxes is treated with the essential oil.  They measured the feed consumption in each nest box and a small percentage, five percent at most, preferred the untreated nest box.  That said, the rodents would have eaten the feed even if both nest boxes were treated with the oil so what the studies showed is that rodents PREFER not to be around some sorts of essential oil.  The rats will still eat your car's wiring if there is no other food around, at best spraying an engine's wiring with oils might send the rats to the neighbor's car.
Does it harm the rats? No, according to this study it helps them learn.   
https://nsj.org.sa/content/nsj/15/4/292.full.pdf   So you have a real problem claiming lemon oil is a repellent when they can dose rats with it for weeks on end with no harm.
The red pepper in the feed myth has long been discredited. I've posted the studies many times, the studies show a temporary preference for untreated feed for about three weeks then the hot pepper treated feed intake INCREASES after the rodents become acclimated to the capsaicin   in the feed.
Then you have to look at the cost of treating a coop with 20% eucalyptus oil every day, around $4 per ounce.... you would pay for a treadle feeder in a few months or a rodent proof coop in a few years.
And we did the math on treating chicken feed with the required level of capsaicin, it doubles the cost to $40 per bag.
People, please take the time to Google these old wives tales before posting.  Well meaning, I get that, but spreading misinformation pushes people down rabbit trails instead of following solid advice on dealing with rodents.  More rats in backyard flocks means more restrictions on keeping chickens from local governments.