Yes, you can spray peppermint oil on a car engine to deter rodents. This works (they hate the smell) and it can prevent rodents from blocking your engine's air intake or chewing wires. You will have to reapply the peppermint oil regularly to keep it effective.