I have two years of experience dealing with rodents out in the wild, more mice than rats. Peppermint oil is for posh ones living in highrises. I deal with the Mad Max kind in the desert. So far it seems that they have stayed away from the two vehicles (Chevy/Ford) that are mostly parked.
Inside the engine bay, I wrap every wire that I can see and touch, not with tape, but with sleeves. The wide diameter makes it difficult for those things to bite down on the wire. There is also one usb RGB sunset (projector) light. Those lights are too bright even for human eyes. One battery-powered trap will zap anyone that gets up there despite all the obstacles. I check weekly to make sure that the trap is available for new assignment. My daily-driver Mazda has wires protected and ground lights at night, no trap or sunset light.
Outside on the ground, I have three cold white led lights mounted on wood boards pointing at the undercarriage. I used to toss the ones that met their demise. Now I keep one or two in a box by the wheel. That smell is more of a deterrent than any essential oil. The ants usually take care of the mess in a week.