There are some other products available, but they require regular re-treatment. Squirrels are notorious for munching plastic. One of my Prieser figures lost half her head. Squirrels are creatures of habit, so they keep returning until they figure out that coming back to the same place doesn't feed them any more. A product called Squirrel Mace works fairly well, but you have to repeat the applications. In a convenient hand spray bottle.Rodents do love them some plastic, especially plant-based stuff like PLA which is a common 3D printing plastic.
There are some products that are natural and contain extracts like peppermint oil and wormwood which are odor deterrents. The downside is they aren't perfect and must be reapplied several times a year or even month depending on your rainfall, to keep the odor strength high enough to deter.
If the rodents are ground dwelling, some sonic devices can keep them away like those windmill rattlers that are sunk into the ground a few feet and make noise that things like moles hate.
I wish there was a more solid answer since replacing track and turnouts can be expensive... perhaps start out with the commercially available non-chemical odor repellents like the Tomcat brand stuff?
Best of luck,