Pedestrian self-defense?

I don’t think there is enough space…

It sounds to me like an automatic reaction to a threat. Like when someone sneaks up on someone, and they punch them. In that small moment, they felt threatened and instinctively responded.

I could argue that the OP wouldn’t have processed it as a car, but just big thing threatening you and reacted without thinking. Is that self-defense?

A lot of people seem to use the phrase that way.