Survivorship bias on historical estimate of the equity risk premium

Can someone helps me to understand why the historical estimates of equity risk premium will be upward bias due to survivorship bias? If the market index only contains survived firms, shouldn’t it mean that these firms are less risky thus investors require less excess return, which should lead to a downward bias of the estimated risk premium?

I don’t remember the exact formula but this point below will give you an idea.

Equity Risk Premium = Average Historical Equity Return - Average Historical Bond Yield Return.

Because of the survivorship bias, the Historical Equity Return is biased upwards and conseqently, by looking at the formula above, Equity Risk Premium will be biased upwards as well.

This helped me out. I was looking at an EOC and it said that during a war, it brought down returns, and I thought well wars raise risk so there should be a higher premium. I had in my head, “shouldn’t more risk mean a higher premium?” But thinking in terms of the formula helped me a lot.