Adjusting for inflation, the stock market was not "flat" during this period [0]. The DJIA, for example, closed at an effective price of 9,160.41 in January 1966 and closed at an effective price of 3,176.25 in December 1982. That's a 65% drop, which is a pretty big stretch to call "flat".
[0]: https://www.macrotrends.net/1319/dow-jones-100-year-historic...