There's a few possibilities here.
The rain sensing wiper ECU behind the rain sensor is prone to faults but doesn't usually cause those type of problems. If you unplug it it will revert to normal intermittent operation which could be helpful to try to isolate the fault.
Have you checked the earth connections behind the A pillar lower covers and check for corrosion. This can cause similar kinds of problems, similar to below
Has anything been added to the car, even if it's been ok for a while, recently had a car that had lots of added wiring for various upgrades. It had intermittent problems with locking and wipers, turned out to be a poor added earth that was making intermittent contact. The added wiring had been in place for quite some time before the problems began
Russ