Over a long enough time period index funds are pretty darn secure. The key is the long time period. And since the beginning of records, the inflation adjusted return is around 6-7%.
Of course if western capitalism finally crashes you'd be screwed. But then everyone in the west is.