Maybe, maybe not. The engine won't run without a signal from the TDC
, so if you unplug the sensor, you'll definitely prevent the engine from starting.
It's possible that you had a loose connection to the TDC
and disconnecting/reconnecting the cable sorted it out. But as you have an intermittent fault, it's equally possible that the fault just happened to go away while you were messing with the wiring.
Intermittent faults are always the worst to diagnose