Designing a power failsafe system

Hi @rjehangir @model14 I am working on a custom asv and iam designing a failsafe system for it .My plan is to use a octocoupler(pc817) which will control the mosfets(IRF5305S) connected to the ESC( " Basic ESC" for T200 thrusters) . Do I need a diode for this circuit? (between mosfet and ESC),what diode should I use ?, am i using the right mosfet for the esc? I am begineer in this field and have little to no idea on how to solve this problem. I tried searching the internet but in vain I didnt get any answers or ideas to solve this problem.