I don't grow squash, as I don't care for it, but I have read that wrapping the lower 4 to 6 inches of the main stem with aluminum foil will keep the borers out. Again, I haven't tried it, because it's a veggie I don't grow.
The wrap would have to be started as soon as the plant was large enough so the stem wouldn't break while being wrapped. More foil would have to be added as the plant grew.
Just something I read. Don't know if it would actually work, though.
"Isn't it enough to see that a garden is beautiful without having to believe that there are fairies at the bottom of it too?" - Douglas Adams