yes it is a mistake, in the same way as assuming that "i thumb my nose at you" is still an insult is a mistake. no one does that and no one calls calls somones genitalia a 'sex'
i swear if some developer thinks that "What, you egg?" is a proper sentence in 2019 imma stab him
I mean, there's a time and a place for almost every synonym that's reasonably setting-neutral. That's the magic of connotation. It doesn't have to be in active idiomatic use among the general population to be appropriate. "Sex" does, I think, have a dust in the lines on its face, so to speak, but I don't think it has lost its place yet.
(Now I don't guarantee that I can describe what the appropriate time and place for it would be. Sometimes when you're writing, it's tough to justify exactly why the word you used just tumbled out from your keyboard. I will say that I haven't used the "sex" synonym in memory, although I DO distinctly remember reaching for it on the metaphorical shelf and then deciding it wasn't the right time to dust it off. I also agree that "I stick it in her sex" would be a pretty shitty use in that one specific example. I further agree that it may be English-naive users who incline to it, and perhaps it may be overrepresented in the I-almost-said-literature. Still, that doesn't mean it's time to drop it.)