So here is the summary. I have followed recommendations from thgoebel and selected option c (a resistor of approximately 500kΩ to 1MΩ in series to Shelly‘s SW input). With such connection the state of inputs in Shelly i4 is reversed (when motors are running it shows OFF and when motors are off the inputs are in ON state). The logic can be reversed in Shelly i4 configuration. I have used the following resistors soldered in line with connecting cables:
Resistor: thin film;SMD;0207 MELF;560kΩ;1W;±1%;Ø2,2x5,9mm
Manufacturer: Viking; OEM nr: CSRV0207FTDT5603;
Below is the diagram of my connection (just one motor for better clarity).
Now I have full status information of my gate in Home Assistant (closed, open, closing, opening). With additional closed sensor I know when the gate is fully closed and based on the time of opening I know when it is fully opened. So with this I can safely open or close the gate without seeing it and it will react properly. So for a cost of ~20EUR (Shelly Plus i4, nodemcu esp8266 board for closed gate sensor and gate control - this could be achieved with Shelly 1 as well) I have converted very simple gate controller to a fully smart one with google assistant controls, automations, notifications etc.
pasted-from-clipboard.jpg