If GM (in indexes) goes bankrupt and Tesla (not in indexes) stays alive, or if IBM (in indexes) goes bankrupt and Palantir (not in indexes) stays alive, then you as an investor in public indexes do not reap benefits of the economy improving.
Palantir is relevant because you cannot invest in it. That's the whole point. Did you read the previous part of this discussion about how publicly traded indexes do not represent a targeted bet on the economy because there are plenty of companies that are not a part of them (e.g. Tesla not in the S&P 500) that can completely replace the ones that are?
I agree that betting on publicly traded indices does not represented a targeted bet on the economy. I disagree that bankruptcy is a big risk to index fund investors.