I think that's totally plausible! Especially because the fact is that "intelligence" is an incredibly fuzzy concept, such that one could be extremely intelligent in the STEM fields, as you mention, but then be simply average in linguistic ability.
Accordingly, even IF the willingness and ability to use profanity indicated a lesser linguistic intelligence, one would be mistaken to then assume that a person with that willingness is any less of a capable professional in non-linguistic fields