Ultimately you can’t control when and how things go wrong but you do have some control over what happens. This is why progressive enhancement exists.
And this is why user-agent sniffing not a future-friendly technique. A new mobile browser comes along, and it has to spoof a fake UA string to all of these sites.
It’s a Red Queen arms race.