We recovered the OPO cavity lock using a modification of the breadboard OPO's locking procedure. I added a 60k resistor in series with the OPO cavity's mirror to create a low pass at about 5 Hz using this resistor and the 500 nF PZT capacitance. The locking script now continually tries to acquire lock with no integrator and a DC gain of about 1000. It then steps the mirror PZT voltage until it finds resonance, at which point it turns on an integrator with a 10 Hz corner frequency with the PID gain.
The feedback loop has a UGF of about 5 kHz and 90 degrees of phase margin (see attached plot). This is much better than previous implementations and suggests that the SHG should also be switched over to a higher resistance in series with the PZT capacitance to improve the loop performance.
The attached plot shows the OPO's transfer function measured with the red pitaya.