Ooof... That is not a consistent moral framework. At least I hope not, you can justify anything
ICE sometimes offers a large signing bonus. If you don't apply, someone certainly will. And you'd probably be much less brutal than the average brown shirt, right?
But you'd personally have a long list of victims just following orders, even if you minimize your impact. You'd still be the one contributing to something horrible.
It's Moloch, the demon of the race to the bottom. It's why companies knowingly allow people to be poisoned... If you're the decision maker and you refused to increase profit through suffering, you'd just end up replaced by someone more willing to cross lines, right?
The difference here is it's very indirect. You're just one tiny drop in the bucket. You're not even the one pulling the trigger. Others have already decided to make a third person pull the trigger, because they expect to profit off the death
Your investment, even if someone else would have taken it at the same price, you got there first. You made the investment value grow a little faster, which means the stock climbs faster, which means the stock has a higher peak, which means the profits made by ultraweathy investment groups that enrich the people lobbying for war profit more. Which makes it just a little more appealing for them moving forward
In some small way, you do increase the cycle of war profiteering. In absolving the practice for others, you make others more likely to do the same
And more importantly, if you profit off suffering, I firmly believe it makes you a worse person. Not because of the act, but because you get yours when people die. That whittles down your compassion for the people you will never meet
Just like if you were a nice ICE agent, trafficking children from their parents will undeniably rob you of compassion