May not be electrical. Air trapped in the system can cause weird actions. The cushioning effect of air can give the ram a stick-slip effect. So Hydraulic fluid is forced in, but, there is an air bubble in the ram. If the cylinder is sticky, or the mechanism is sticky, or there is a mechanical point that requires just that much more to get through the cylinder can hang up. Then, (at worst possible time usually) it breaks free, and the air pressure (which is at peak hydraulic pressure when created) can cause wild motion. This way or that way.
Re bleed the cylinders well (may require pulling cylinder to stand on end to purge all air) . if it persists, get a clean bucket with calibrated marks and run the valves through their paces and measure the output (at the cylinder) and see if any are not flowing well, or semi equaly. I say clean because you are going to need to reuse the fluid.
Also check the valve(s). I have a D0-5 electric valve on my JD tractor that will at times stick and suddenly unstick. especially happens after period of disuse or using it into a deadhead line (my bad).