Do you know whether wild animals use herbs, bushes and trees at random to rub their bodies against, or do they choose the these plants in some way?

Different plants have different chemicals in them. They have different tannins and essential oils and other pest repelling chemistry in them.

It would be natural for any creature to be able to recognize and use elements of its environment, which we might call beneficial elements, to protect itself against some other elements that we might call harmful elements.

Using rich ecosystem of roots, fungi, herbs, shrubs, bushes, trees, vines seems very natural way of getting rid of ticks and other parasites. As we know plants have properties that repell certain pests by their smell (which come from the higher content of essential oils), some that cause indegistion, or poison the one who ingests it.

A primary way of survival of any creature, would then be an exelent understanding of its environment and extensive knowledge about the properties of elements within it. To the extent to which such creature knows and understands the innerworkings of its environment, the creature can be more successful in accomplishing its goals in their respective modes od operation.

Therefore an animal would eat certain plants, herbs that act antimicrobial, aid digestion and detoxification processes, provide essential minerals etc.
Such animals would rub their bodies in the herbs, bushes and trees that have certain chemicals in them that repell parasites and other unwanted pests.

This is what humans would have done in the past, before we lost our ability to recognize anything useful in our environment and are increasingly further from understanding how it works.

We've reduced ourselves to a creature limited to gathering resources needed for life only from a shelf in the supermarket.

And I'm not even talking about recognizing the chemical properties of plants. I'm talking about humans not recognizing what is food and what is not at a FOOD at all.

Speaking then of intelligence and true intelligence...