3phase mains faliure circuit

So where are you intending to connect the AC side of the opto.
I get the impression you are not fully aware of what you are endeavouring to build and therefore withdraw any suggestions or guidance I have previously made.
I respectfully suggest you back away from this project as you are dealing with seriously dangerous ziggies.