No that won't work, I believe with the Shelly Dimmer 2 you can't have toggle switches on S1 and S2.
S2 I believe is used for dimming in combination with S1. (S1 dim up, S2 dim down)
A simple on off can only be connected to S1 if I recll correctly.
Would this setup work with the shelly dimmer 2?