Your code from Post #1 crashed (with stack exceptions) when I tried it. It ran fine when I increased the stack size to 2000 bytes for each task. I even enabled the Serial.print lines and saw output in the Serial Monitor.
I'm still having trouble understanding exactly what you're seeing. Does a simple "Hello World" sketch print in the Serial Monitor? If nothing prints, how do you know it's crashing?
I've sometimes had trouble opening the Serial Monitor with ESP32 boards. To get around it, leave it closed and do this:
void setup() {
Serial.begin(115200);
delay(4000);
After the code uploads and I get the "Hard resetting ..." message, I then open the Serial Monitor during the 4-second delay. Haven't had any problems doing it that way.