I am just looking at this and have some thoughts.
If you try to replace one of the switches with a relay it has to have 3 output terminals and will require power of its own so in that diagram it would have to be behind the first switch plate in the chain. A Sonoff MINI I don’t think will do that job because it doesn’t have normally closed and normally open 3 terminal output.
However, this approach is not great because you will only be able to schedule “toggle”. If you want to go away and want to be able to predict a definition of “on” e.g. for timed security lighting then you must ensure the other two switches are in a known configuration before you go on vacation otherwise On will be Off and vice versa.
A better approach might be to try to get an extra cable run above the ceiling to the lights, taken from the same circuit (Or I guess another one if you know what you are doing). Then use that to insert a sonoff mini (for example) above the ceiling. This is likely very easy above the ceiling if this is a top floor because the rest of that light circuit will be present in the roof space. But if you don’t have a roof space it will be harder. Then convert the switch network to be just a loop, that starts above the ceiling and comes back - by making a modification behind the first switch. This loop just connects across the switching input on a sonoff mini for example.
An attempt at explaining this with text:
Today :-
LIVE- > BLAH (switch network) → LAMP
NEUTRAL(thru switches) → LAMP
Tomorrow :-
LIVE (new one, same circuit, above ceiling) → MINIR2 → LAMP → NEUTRAL (new one above ceiling)
LOOP (disconnect power and neutral at the first switch , wire the neutral that went to the lights to the old live input of the switch network, to make the network into a voltage-free loop… ) → BLAH (switch network) → BOTH MINIR2 SWITCH INPUTS
Critical to ensure the miniR2 switch is in the live. So when it is off you can change bulbs and what not without cutting the power. And after this change I guess the light switches are just across the miniR2 switch terminals.
This would be much nicer because then “turn on” from automation is ALWAYS turn on regardless of the state you have left your switches in. The switches would just toggle the relay I think.
Would be interesting to hear any better ideas ???
Be sure to read the wiring regulations and adhere to them.