Yeah, it doesn't work as well in German either.
The German word for sex is Geschlecht.
It is never shorthand for sexual intercourse, which is Geschlechtsverkehr (formal) or Sex (informal).
So we don't have the ambiguity with the German word for gender sometimes being a word for sex and sometimes one for socially constructed sex stereotypes.
There was until recently no word for gender in the latter sense, the words used for that instead being directly derived from the German word for sex.
So sex stereotypes is Geschlechtsstereotype and sex role stereotypes is Geschlechterrollen.
But of course critical theories have been reigning supreme for decades in German academia, too, and so we've got the English loanword Gender making its way into the mainstream now.
Only the problem is that no one can be certain what it refers to. It is sometimes used to refer to sex stereotypes and sex role stereotypes and sometimes used to refer to gender identity, which no one can explain. But never to sex. I've got the feeling this confusion is welcomed, because it makes criticism of the doctrine of gender identity harder if it looks like you're objecting to the concept of stereotypes being constructed rather than inborn.
But there's currently another onerous assault on the language, called Gendering. A bit like what the OP describes with Spanish. For decades we have been using something called Binnen-I to correct for default male usage. So the German word for a male teacher is der Lehrer (plural Lehrer) and the word for a female teacher is die Lehrerin (plural Lehrerinnen). Traditionally when referring to a group of teachers it would have been die Lehrer. Which clearly defaults to the male form and doesn't acknowledge that there may be female teachers in the group. So from the 70s onwards either people started using a pair phrase for both singular and plural = Lehrer und Lehrerin, Lehrer und Lehrerinnen or the shorter Lehrer/Lehrerin, Lehrer/Lehrerinnen which was just not that practical (imagine this applied to every word referring to people).
So over time, shorter forms were used serving the same purpose. Either Lehrer/-in Lehrer/-innen or LehrerIn, LehrerInnen, with the capital I denoting that this word referred to male and female teachers (this is the Binnen-I or internal-capital-I).
When pronounced, the short forms make all these words sound as if they were defaulting to female, but that was considered acceptable, since people's general aim for clarity and comprehension in communication meant that they would usually make it clear that they were referring to both sexes when speaking.
But that's no longer good enough, because acknowledging that teachers may be female and not just male does not acknowledge that the females and males may identify elsewise.
So now there's a push to include the Gendersternchen (literally "little gender star"), to acknowledge that teachers may have an identity and not just a sex.
So LehrerIn becomes Lehrer*in. But it's not just written, it must also be pronounced differently. Instead of saying one word, you now must say Lehrer+glottal stop(a bit like an abrupt stop)+in.
An awful lot of effort for an awful lot of nonsense in my view. It's not fully caught on yet, but it is heavily pushed.
When you speak to just ordinary Germans, they're either not interested or bewildered. They do want to be kind though. And there's nothing resembling the feminist pushback or the wider gender critical movement there, so this stuff just gets taught in schools unchallenged.
However, German education is very STEM-focused and teaches critical thinking, so when I talked to two German teen girls in the summer it became apparent that although they had been fully indoctrinated, the lessons didn't quite take. They did generally believe all this stuff, but every now and then the hyperbole of trans rights activists jolted their critical thinking skills into action.
They were horrified by words like menstruators or people with a cervix or vagina-havers or pregnant person though and didn't believe me when I said those words are now used by public bodies and politicians here.
So it's interesting to see what Germans will make of dehumanising language like that, because given the country's history they are very sensitive to the issue of using dehumanising terms about people.