I you are running tubeless tires you are usually able to repair on the spot and get going. I have two 12V compressors that I've never had to use. One is a Slime and I can't remember the other. I have seen the Slime used and it worked fine, in fact better than I would have thought.
You also have the option of using CO 2 cartridges but I've never had to use them either. If you go that route be sure to take plenty of them as it takes a few to fill you tire. You can also buy a can of air. I carry one but have never had to use it either.
In my experience one of the best options you have is the free tow insurance most insurance companies give. I did have a flat one time that could not be fixed on the spot. I called the tow insurance number I had and they were out there pretty quick. They towed me to a place where I could buy a tire.
I always carry my little compressor and hope it turns out to be waisted effort. But I have it if needed.