This was karmic in origin, but not the karma of the immediate mood state of that morning and the recent conduct and the emotions surrounding it through using social media, and so on. This was of deeper karmic origin. The current circumstances in the present life will often be the catalyst to have delivery of a karmic consequence. This is because any discord experienced during the ongoing life will at times resonate with prior circumstances from other lifetimes of difficulty. This is a signal to the Law of Karma that you are lined up in an appropriate way to have presented to you an imbalance created from past experience either at your own doing or at the hands of others, and the Law of Karma may step in to deliver that lesson in some way or another. This can take many forms such as accidents, severe strains on interpersonal relationships, or a health problem blooming into perceptible symptoms, for example. That is what happened here—you were given, in effect, a karmic payback for areas of neglect in other lifetimes and then suffered a loss.
In this case, it was only the inconvenience of dealing with the aftermath of the accident and not injury or death. That is owing to the divine intervention you allowed to happen by making a request for divine partnership to keep you safe. So, in this case, the karma was not of sufficient magnitude to prevent a divine rescue and this too was a blessing and owes to your good spiritual standing in a general sense. That does not mean your day-to-day emotional life and thinking thoughts that are not in divine alignment can be tolerated and not given any concern about their consequences. It is being out of alignment that begins to set karma in motion. There will be an addition to the negative karma by any such episode however small. Our perspective is that it makes no sense to incur a small karmic penalty if this can be avoided and is just as desirable to attend to than as a large karmic penalty. After all, karma is additive, so why throw any fuel on the fire that can be avoided?