I've always printed two boarding passes and kept them in my carry on. I've had gate agents walk away with my boarding pass in the past and simply never return.
yes I've thought about this as well after the event, now I keep a printed copy in my pocket and use the one on my phone in case something like this happens again (on a different airline)