Do all four-letter-words have four letters?
Solution 1:
A red carpet, literally, is a carpet that is red. A red carpet, figuratively, can be a carpet that is actually blue, or no carpet at all, just some pavement painted red.
A four-letter word, literally, is a word with exactly four letters. A four-letter word, figuratively, is a swear word.
Literally, literally, means "literally". Literally, figuratively, means "virtually".
You get the idea.
So the question remains whether the figurative use of four-letter word to mean "swear word with any number of letters" has any traction. In my neck of the woods, it does not, and neither does it according to Wikipedia. But that does not mean it just never can be used figuratively anywhere ever. Any word at all can. The speaker/writer merely needs to understand, and admit, that his usage is figurative.