"they" is used to refer to a group of people.
If you don't know whether an individual is male or female, use context to make an informed guess about gender. For instance, a doctor is more likely to be male, while a nurse is more likely to be female. A pimp is probably going to be a man. A hooker is probably going to be a woman. Even middle schoolers know this.
Where context isn't useful, then go for "he". You probably don't have a degree in linguistics, and you're probably too poor for JSTOR access, so I'm not going to waste my time bringing up the academic papers that you won't be able to access, read, or understand. But "he"/"his"/"him" is the generic term, NOT "they" /"theirs"/them".
"They" refers to a group of people. "It" is for animals and objects. There are only two genders for referring to individuals: "he" and "she".
We already lost "thou" and look how society has suffered from the forced ambiguity of the second person pronoun. Don't let our adversaries turn you into a "them".
Speak your goddamn native language properly and with pride.