Hi Leetrix
I don't have your exact requirement detail but i understand what you are trying to do.
You can achieve this by configuring RPM probe to detect the reachability and then using that in event-options policy to configure/delete particular static route.
I have configured and verified this scenario in lab on MX router, please refer the attachment. please change the IPs to match your setup.
Please accept my response as solution if it solves your query! Kouds are appreciated too
Thanks
Vishal