Planning ahead and thinking preventatively is difficult. Planting resistant cultivars would preclude the use of pesticides. I've had corm borers attack some of my plants. That why I don't grow those types anymore. Thinking ahead is the key. There are many more effective preventative measures that are less expensive than an exterminator, or the pesticides.
In the environments where my houses are, I use materials termites do not eat, like steel and concrete, and earth friendly materials. Living sustainably requires some forethought. Think before you throw away money and you will have much more of it!