There's a lot of data to suggest Trump's constituency is built on perceptions of "relative downward mobility" of white people among their economic peers.
I don't regard this article as particularly amazing, but it's one among many saying roughly the same thing: the popular "Hillbilly Elegy" narrative of the economic anxiety of extremely poor white Americans, or Rust Belters, widely promoted by the press, played out as the racism and xenophobia of a wealthier bracket of Americans in practice.
https://www.vox.com/policy-and-politics/2017/5/9/15592634/trump-clinton-racism-economy-prri-survey
That survey also found that Trump supporters are actually richer, not poorer, than average, although they tended to be blue-collar and less educated. Trump supporters also tended to live in racially segregated areas, particularly those that were not especially hard hit by trade or immigration. As for their socioeconomic struggles, they weren’t about income inequality, but rather relatively high mortality rates and worse intergenerational mobility. All in all, this suggested that something else — not typical economic hardship — was behind Trump’s rise.
Trump's swing voters were racists voting for his racism. Yeah, they're malicious and deluded, but they're not voting against their own interests in the manner you describe.