Remove the door panel and unplug the window switch and use a shunt to cross over the contacts for up and down on the window.
If it works flawlessly, then it is your switch that is bad.
FIRST CHECK THE SWITCH to make sure that it isnt the culprit.
If it is still intermittent, then you have a...