By all means have a spare bike, but first analyse what might go wrong, likelihood, how to fix, tools and spares that might be needed, defensive strategies to prevent failure and so on.
Then much like fixing a puncture you can put yourself in the position that most things won't go wrong often...