It was first seen in online queer activist circles around 2004. You can read a little about it here. Latino is traditionally masc/neutral but English style guides also said the same about “he” when referring to someone of unknown or unspecified gender for a long time, which has largely fallen out of use for singular “they” now.
Personally, I don’t use Latinx in writing to refer to all Latinos/Latinas as polling has shown only 2-3% of people readily identify with it. But I do think you absolutely should use it if that’s how someone personally identifies.
There are some people who identify as Latinx. Pew puts it at 2-3% of Latin Americans, usually those who are non-binary.
I think the reason that it has the astroturfed white middle class vibe is that it’s really been pushed by corporate culture for whatever reason, who use it as catch all for all Latin Americans which clearly doesn’t line up with how the majority self-identify.