Almost any generalisation on this subject is prone to be rewarded by painful and embarrassing exceptions. So I never generalise.
However, most species under most conditions are pretty peaceable. The paper wasps that have stung me invariably did so when I had carelessly brushed past their nests. Most of the others are hearsay. Paraponera (look it up!) lives in South America, a continent that I never have visited, worse luck.
The painful knock you mentioned probably was painful, not because your maker had designed you to suffer that way for your own good, nor for that of your immortal soul, but because you had accidentally struck a nerve in the wrong way in the wrong place, thereby causing it to pass on neurological rumours of war and disaster disproportionate to the actual event. The same thing happens in any communications system; tickle the wire and everyone gets to hear of it immediately. For example, blowing up a journalist makes far more noise for far longer than a civilian, a politician, or (yaaawn...) a soldier.