Touch wood it has only happened once with my e bike, around 2 miles from home! I hit a big metal staple at the side of the road avoiding a truck that was taking up the whole road! Then I managed to break both of my tyre levers, since replaced them with Schwalbe Marathon capable levers!
Many years ago I took my road bike in the car to ride over a Scottish mountain called Ben Lawers, I got to the top of the climb and there were workers repairing the road and their machine was totally blocking the road! I got off the bike and pushed it round the machine which meant going off road on a very rough part!
I got back on the road looking forward to the big descent only to discover my rear tyre was totally flat! I thought no problem I will just stick one of my spare tubes in and be on my way, the only problem was I had left them at home!!! Ok at least I have my puncture repair outfit so all will be good, for the first time ever I could not get the patches to seal no matter how I tried....frustrated and downhearted I started the walk of shame but I was 30 miles away from my car! Now I'm hoping another cyclist might appear or even a car that might be able to help! I couldn't get a mobile signal either so I was really in trouble!
All of a sudden I came across a telephone engineer who was repairing a line at the side of the road, I asked him if he knew where the closest cycle shop was and he said it was 30 miles away!!! I told him where my car was parked and he said it was my lucky day as he would be passing it on his way back, but he had another hour or so of work to do! The next problem was his van was tiny and was stuffed with all sorts of things, he said it might be a struggle to fit the bike in! Within a minute I removed my 2 wheels and he said "thats more like it, it will fit no problem"
What a relief that was phew, the next scary part was his driving though!
He was flying round blind corners without a care in the world, I have never been so glad to see my car in my life! Big lesson learned that day, never to be repeated!