In a static environment, yes this is the way to enter a backup route. You could introduce dynamic routing protocols to your environment, but that would require some design.
Be aware, static routes stay active if the next-hop is alive. So, if you have a border router or firewall that handles the internet connection. This route will stay active if the interface is up to the core. No matter what the internet connection is doing.
You need to create an ip sla that will ping out of the relevant interface to whatever will fail to respond under a failure condition. Then you should create a track object to reference the ip slaand finally, your static route should reference it.
What the OP described is how to do it with static routing. You can also use BGP if the two providers support it making certain to do prefix filtering.
Another option is to do VRRP between this and another device if you have two physical gateways and you want one to preempt the other. The advantage with this is you can track a port and when it goes down change the VRRP priority for the VRID. You probably want to track a GRE tunnel or something.
What you described for a static route makes sense. Sometimes the easiest way is the best way, and this certainly is the easiest.