I know about the insect that bores into the stalk and kills squash and zucchini plants, but this was totally different. I’ve never seen that type of rot on a main stalk. It was doing great one day and dead the next.
Sounds like a soil borne bacteria or fungus.