Only way to fix electrical is with schematic, who knows if this is factory.or add on. Schematic will allow you to trace and troubleshoot.in logical manner. I am degreed electronics tech, never touch any wiring without schematic on old cars. Most are not 100% factory stock. That will make troubleshooting harder. If stock schematic will identify all parts for you..electrical can be tricky, impossible without diaghram.Does your coolant temperature gauge ever start climbing in a situation like this? You might want to leave your engine idling while parked and watch both your fan and your coolant temperature gauge. If the coolant temperature gauge begins to climb above it's normal operating temperature without the fan kicking on, then you will have confirmed the fan issue. If the fan kicks on after 15-20 minutes without the temperature gauge moving above its normal operating temperature, then the fan control is working normally.
It looks to me that your wiring harness connector has a protective cover over it (if that wiring harness connector is not used on your particular car). But that said, if you move it and the fan turns on and off rapidly, I would agree that moving the wiring harness may be causing it and that you have some kind of wiring issue there. What are the colors of the wires on that connector? Include the color of the stripes on the casings of the wires if they have any stripes on them.