I don't know how inflation metrics in the UK work, but a huge proportion of CPI and PCE are housing costs (both rent and imputed costs for owners).
It is true, however, that aggregate measures of inflation do not take into account how it affects individuals. There are specific inflation metrics that try to address specific sectors with different weighting (e.g. elderly) but it's an imperfect science. Median wage growth across a variety of groupings has actually been remarkably similar (see e.g.
https://www.atlantafed.org/chcs/wage-growth-tracker ), but you can see that since about 2021 the third and fourth quartile have been lagging substantially behind the first and second quartile until about late 2023. I imagine there's some more sophisticated analysis that has been done, but it's not obvious that specifically poor people have been experiencing erosion in their wages as a group compared to richer folk.
All politics is local, however, and it's likely that specific groupings in important swing states may be experiencing real decreases in their quality of life. It's also wildly likely that people are not economic machines and 'feel' high prices much more than they feel higher wages that compensate for said prices - especially when wages tend to lag prices. I do think that Loki's basic analysis is correct, though, that political leanings are all about narratives people believe rather than any specific case of self interest (though I take issue with his implicit assumption that being pro-union means a union members should vote for a candidate). Hell, one could argue that my voting patterns have little to do with self interest (except in a rather sophisticated 'enlightened self interest' kind of way).
In my view it is counterproductive to castigate people for voting against what you perceive their interest to be. It is equally counterproductive to throw up your hands and say that you can't fight Fox News or social media or whatever. I think it's better to try to understand the narratives that people believe,
why they believe those narratives, and try to find a more compelling narrative to convince them to change their mind.