Finally got it working correctly. I had to use M5Burner to erase my M5StickC, and then set it all up again from scratch and reprogram it. At least I was able to get it to forget old wifi networks.