@resormar There was a thread https://forum.duet3d.com/topic/3919/ft5-conversion-endstop-issue about a similar problem, maybe the information in it can help you. (but when testing wiring, please be careful not to short 3,3 V and ground, this will damage the board!)

But I suspect a contact problem of the soldering joints, not only the com, but the middle pin also. It is possible that the soldering contact is only closed when a force againts the endstop is done. You could test the contacts with voltmeter measuring the connections (endstop detached from Duet board) and shake the plug while measuring. You could also hold the housing, press the endstop and if in this case the duet doesn't light the led, is propably a cold solder joint.