I think your point is well put, and I can agree with most of it, at least in terms of myself. I know I am a robotics engineer, and my best prospects for working on interesting or exciting stuff is in aerospace, defence etc. But I don't do that, because I think this way myself. I find it harder to judge others for the same.
That all being said, I think its worth noting that the reason that coal miners have historically had quite outsized political power and effect on politics was precisely because they required education, which helped them work together as a unit and demand better conditions and wages, as well as the camaraderie generated by experiencing bad conditions together. There are some great books about this, but the coal miners in the uk where im familiar with were much more educated than the average person, due to the engineering understanding involved. Yes it was bad conditions, but you can't have untrained workers using equations to figure out how deep into a rock face you need to put dynamite, and how much explosive of what kind, based on rock samples and tables from books. Same for what kind of supports and where, taking geological surveys etc. It was a high skill job, and also paid relatively well compared to manufacturing workers (not least due to said organization between miners)
The difference between then and now is that there is very little solidarity between software engineers. This is a state of affairs that I believe has been deliberately engineered. I do not think shaming people for where they work will improve things. I think one can assuage ones own guilt by choosing where to work, as you or I do. But I don't see how the solution can be to ask everyone in society to just not take a better life, better income etc for themselves. Especially when the harms are very indirect.