Yes, I believe that is true. But evolution is not just a matter of random genetic mutations coincidentally producing the right traits for a given environment. It also involves natural selection acting on variation, and an interplay between the plant and its environment, where the plant exhibits evolved defense mechanisms in response to environmental challenges. This reflects the concept of teleonomy—an apparent directionality or purpose in biological processes. At the very least, such interplay brings us closer to the idea of “apparent” intent and function, without implying conscious or deliberate purpose.And if there was actual conscious intent, epigentics would play for and not against this very controversial and highly speculative statement.

Epigenetic Mechanisms of Plant Adaptation to Biotic and Abiotic Stresses
Unlike animals, plants are immobile and could not actively escape the effects of aggressive environmental factors, such as pathogenic microorganisms, insect pests, parasitic plants, extreme temperatures, drought, and many others. To counteract these...