Firstly check all the locks are free moving and not seizing up, and then check all the connections inside the door, and if possible give the terminals a tweak with a little screw driver to tighten them up.
If it is the door looms, u coudl try continuity testing but being an intermittent fault you're not guaranteed to get any results. You could just pull the rubber sections out and see if theres any broken/shorting wires inside which i bet there is.