Index funds adjust based on performance of the underlying stocks, so it doesn’t really matter if one of them does poorly. The index fund will adjust. When you buy an index fund like the S&P 500, you’re taking a position that the mega-caps it comprises as a whole will give you outsized returns over extended periods of time.