Answer: Borers usually attack about the first three feet of the vine. I have not seen tin foil used for this, the recommendations are generally for using cheesecloth or nylon stocking or similar breathable materials to wrap the stem. There are some other steps you can take, such as encouraging the vine to root at the nodes so there are additional roots further up the vine, using a floating row cover to exclude the moth stage of the pest, making successive plantings, using resistant types of squash, and certainly and very important, be sure to clean up all vine debris as soon as the vines are finished, as described in the following publication. You may need to cut and paste the complete url into your browser to make it work correctly.
I hope this helps.
Q&A Library Searching Tips