There is a gate which is to be controlled by 2 motors, but one should work and when one fails the other should work. AND THE CONTROLLER USED IS A PLC
Probably the simplest, most efficient solution would be powering the mechanism by both motors simultaneously, connected on the low-torque side of any mechanics - e.g. both propelling the same linear actuator, or the same first gear of a gearbox. Have them with enough surplus power that each can move the gate and idle second motor simultaneously. The gate will open slower with one motor, but it will open just fine.
You can expand on that idea by having the PLC read the current drawn by either of the motors when active, and switch it off (to idle, open contact) if detecting either the current is zero (burnt) or way over the top (short circuit). If the current in both is way higher than normal, but still not at short circuit level, the PLC should switch both motors off and signal gate blocked / mechanism jammed. (similarly, current way low; gearbox broken, motor running without load.)
That way you're keeping the mechanics simple and move most of complex decisions into software.
Now, if you want to save up on electricity, and use cheaper, weaker motors, you'll need either electromagnetic clutches (...and there go all your savings on cheaper motors), or unidirectional (free-wheel) clutches (so that an idle motor isn't pulled by the active one), and forgo simple switching of direction by reversing polarity, in favor of electromechanical gearbox that allows switching direction of the output rotation.