This is a common misconception. It's so common that I feel it merits a decent explanation -why- it is incorrect. Not to pick on your comment - it was just the first one I saw that mentioned the Nikkei :)
You can't simply look at the price graph of an index or a stock and make judgments. Aside from dividends, companies can do all kinds of wacky things such as special distributions, perform buybacks, issue new stock, pay out class action settlements etc. Oftentimes stock holders can make extra money through stock yield enhancement programs: if I hold a share of Google in my account at Interactive Brokers, and it has a borrow fee of 5%, IB will automatically lend my share out to people who want it, giving me some decent cash on the side. They split this 50/50 between you and them, so if I had 1 share worth $1000 of Google, that'd be 5% * 1 * 1000 = $50/year lending cost, of which I'd get half, or $25 profit. (Worth noting: My share remains mine to do what I want with at all times - the lending doesn't affect me at all.)
Unfortunately it doesn't even stop there. Even the total profit is not a good enough indicator. Imagine a stock market that craters from 2020 to 2030, going from $50 to $20. With dividend reinvestment and other things added, your total account value is $25 in 2030, or half of what you put in. However, in the same time, the cost of living halved. Your investment would buy exactly as much bread, eggs, housing, Netflix etc as it would when you put it in. Was your investment a good one? You still can't know: you'd also want to take a look at things such as other foreign markets, exchange rates, risk, volatility, and alternative types of investments (bonds, housing, land, etc.) I'll ignore those factors for the rest of my comment, but if you want to see data on the Nikkei and CPI, this is great: https://dqydj.com/nikkei-return-calculator-dividend-reinvest...
Anyway, back to Japan. Buying the Nikkei at its absolute peak in 1989 and simply holding it (with dividend reinvestment), never adding a penny to your account, would have produced total returns of 54% in US dollars or 13% in Yen. Still poor returns on an annual basis, yes, but this is with two rather unusual assumptions - 1) buying at the absolute all-time peak way back in the eighties after a to-this-day unprecedented growth spurt, and 2) investing on that one unfortunate day and never putting in another penny. Most people put money in gradually over many years.
Specifically, what the gp comment said was "trickling cash in slowly over time". Assuming you put money in for the decade preceding the 1989 crash, your total returns today would be (by year, investing in December, US dollars):
1989 54%, 1988 71%, 1987 134%, 1986 261%, 1985 558%, 1984 821%, 1983 956%, 1982 1237%, 1981 1172%, 1980 1241%, 1979 1603%. Average 737.1%.
For the decade after the crash, and later:
1989 54%, 1990 130%, 1991 133%, 1992 187%, 1993 154%, 1994 106%, 1995 106%, 1996 120%, 1997 216%, 1998 215%, 1999 112%. Average 139.4%.
1999 112%, 2000 208%, 2001 356%, 2002 432%, 2003 272%, 2004 230%, 2005 163%, 2006 141%, 2007 157%, 2008 257%, 2009 189%. Average 228.8%.
If you had contributed $1000 per month from '79 to '89 you would have $1.1 million today; if you did the same from '89 to '99 you would have $316k; if you did that from '99 to '09 you'd have $434k.
Over any span of time, if you contributed a few hundred dollars per month to the Nikkei during the length of a typical career, you would be a US dollar millionaire today. I would say his Japanese peers are doing just fine.