My dad played professionally for years. He taught me that (1) amateurs practice until they get it right, while professionals practice until they can't get wrong, and (2) failing to prepare is preparing to fail. I prepare for bass failure by taking a backup bass, and it's always a copy of my #1. It's come in handy quite a few times over the years as I've had tuning machines, controls, and output jacks fail, strings break, and so on.
I prepare for failures of my DI by carrying a spare DI. I prepare for failure of our backing tracks iPad by carrying a copy of that iPad. We prepare for failure of our mixer by making sure the sound guy brings his. We have a backup amp in the rack. We have extra mic cables and power cords on the reels. I have extra strings, patch cords, mics, mic clips, power strips, batteries, picks, drumsticks, ears, ear amps, iPad cords, tools, etc. in a small stage bag. The drummer brings an extra snare. The guitarists bring extra guitars.
Things we're using multiples of on-stage, like keyboards, toms, lights, speakers... we can get by with an individual failure that wouldn't kill the show. So, we don't being spares of these. But we do have plans on how to work around failures.
For outdoor gigs, our weather can be extremely hot, windy, and stormy without warning, so we have to plan for that too. So, we bring extra tarps, bungees, weight bags for the canopy, sunglasses, sunscreen, hats, fans, drinks, etc.
When someone has to miss a gig, we have a list of subs, and could also cover them in backing tracks if we can't get a sub.
I've had my share of failures over the years. There have been a few late starts, but with a reasonable level of forethought, planning, and preparation, I've never had to cancel a gig because of an equipment failure or a missing person.
Our early attempts at failure planning went through several preparations. Preparations A through G were progressively better. But our current plan... Preparation H... really does a great job of saving our butts!