When I was a graduate student I encountered a theory, told me by one of my professors, that connected the demise of the Old Kingdom with the lengthy reign of Pepi II. The theory was that after Pepi kept on living, and living, and living after completing his pyramid and that the workers had nothing to do and so the country collapsed. This would not, however, explain why the country waited until after his death to collapse.
The basic facts of Pepi's reign are not as clear as other Pharaohs.
Manetho assigns Pepi II a reign of ninety-four years, which would make him the longest reigning monarch of human history. Unfortunately, Manetho lived nearly two millennia after Pepi II. The highest regnal year attested in contemporary monuments is the year of the thirty-third cattle count. The cattle counts were at most two years apart. So that would give a date of sixty-six years at most, which is still a lengthy reign.
That Pepi II came to the throne while still young seems apparent from his preserved letter to Harkhuf where he suggests eager but unwise measures in the treatment of people.
The pyramid of Pepi II is a standard size pyramid. The interior is decorated with many pyramid texts.
That there was a change in Egypt very quickly after the death of Pepi II is clear. Whether that change was a good thing or a bad thing is not as clear. At this point, we simply do not have enough information to tell whether Pepi II reigned too long, but if that is the case, he certainly was not the last to do so.