ESP 32-c3 stability problem

Add some Serial.print() statements to show the flow of the sketch in the Serial Monitor. Copy/paste that information here (beware: the Serial Monitor in the IDE will only allow one window of copy... so use the width of the window for output data).

The link in Post #21 shows how to Serial.print() the stages of connection and communication.