system
Given the following post, respond as if you're commenting on Reddit:
human
In cultures with a concept of 'profanity' (as English speakers would think of it), is it universal to curse when under stress or in pain? Why?

This question is actually an intersection of psychology, neuroscience, and linguistics, but the psych/neuroscience element is most interesting to me.

I'm tetra-lingual (knowing 3 Indo-European languages and 1 Dravidian language) and in each language I'm familiar with there are a subset of words that are sort of "taboo" to use in polite company but it is common to shout them when in distress, like if you are hurt or angry.

Is this a universal thing across languages and language families? Are these cultures that don't have such 'profanity' taboos?

And where it does exist, why do people tend to utter these words specifically under stress but put up a taboo around doing it at other times? Is there a psychiatric element to this and is it at all related to the vocal tics that come with impulse control disorders?
gpt
There is some research on the hypoalgesic effect of cursing (swearing mitigating physical or emotional pain) but it is relatively limited. 

From an operant conditioning perspective, people may limit use of curse words in the presence of certain stimuli that are associated with punishing consequences. So the people, events, and objects associated with a workplace, formal event, or classroom signal that cursing will result in derision or other negative social consequences. In turn, others may be less likely to respond negatively when you curse under conditions of pain or distress, so pain may serve as a signal that negative consequences are unlikely to follow.