I am not sure if this is easy to implement. If there is an app that supports sending an HTTP command when the phone connects to your WiFi, that would do it, but I don’t know if such an app exists.
I actually have set up my Google Pixel phone (which supports Google Assistant) to accept voice command — when I get close to home, I just pull my phone and say ‘open my garage door’, and that’s pretty convenient. Not as convenient as automatically opening the door, but still pretty fast. In fact, I think this is more reliable because if you are at home and your phone accidentally disconnected and reconnected to your WiFi, you don’t want it to automatically open your door.
We actually had support for this in the app using Geofencing however due to many issues supporting this with Apple’s Swift changes we had to remove it. This could be explored again in the future though.