This is also not a hypothetical situation -- something quite similar happened in Egypt a few years ago [1]. And that was using good old fashioned entrapment. The damage could have been far more significant with large-scale data analysis.
While I can't speak for OP: they likely feel comfortable posting about their gender/sexuality on here because they live in a place where that won't happen. And while HN is often less than progressive on LGBT issues, users here generally aren't calling for public executions. But not everyone lives in the US or Western Europe, and these people live under a genuine threat of death.
[0] https://en.wikipedia.org/wiki/LGBT_rights_in_Saudi_Arabia
[1] https://www.independent.co.uk/news/world/middle-east/egypt-l...