After decades of gigging and thousands of gigs and 10's of thousands of hours playing, my advice is to know your gear and whether it's gig-ready. Yes, bad things happen, but you're much more likely to experience a failure if the only time you touch any gear is on a gig. If you're regularly using your bass and in tune with it's state at all times, you're much more likely to catch anything before it becomes a problem.
Exceptions do exist. My worst was when a tuning peg on my upright broke without warning while tuning my bass. Carrying a spare bass wasn't an option and I had to have new wooden pegs turned for my 150yr old bass. Those will probably last another 150yrs, at which time it won't be my problem. It's otherwise pretty rare for a bass to outright fail without some warning signs, if you're paying attention.