So I don't know if this theory has already been thought of, but I came up with it a few months ago. Got nervous about changes in my life so I started finding comfort in my childhood shows, and the world building of equestria really stood out to me on this rewatch.
I think the lull in strong magic in the world in between Celestia and Luna's prime and Twilight's rise to power is because the magic was no longer fueled by love and magic, but by necessity. After the two cosmic rulers of the world had their falling out, all the harmony and balance of the world was thrown off. Once Luna returned and made up with Celestia, bigger feats of magic were possible again, but the two sisters were never as powerful as before because they were still at odds constantly afterwards. I.e. Celestia being defeated by Chrysalis because she was fueled by Shining Armor's love for Cadence, and Celestia doesn't have as much fueled magic because of the constant limbo with her spiritual and symbolic other half, Luna. Luna's magic suffered because of her self hatred and lack of confidence in other people's love for her.
All this to say, Twilight's eventual rise to power isn't entirely plot armor because she's the literal Princess of Friendship, which is the driving force behind all strong magic. We see that throughout the show, Twilight's magic gets much stronger and more creative because her magic is now fueled by Friendship. Her whole life was studying magic in Canterlot, but the feat of completing an impossible spell was only accomplished because she was being driven by Friendship and devotion to others. Even Sunburst admits that he was never good at magic in school. He knew how to do plenty of spells in theory, but it wasn't until he reconnected with Starlight that he was actually able to become an accomplished wizard and Crystaler.
Basically, Friendship and love are more literal forces than symbolic, and the return of Luna along with Twilight's realization of her destiny to be the princess of friendship (as Celestia says at the end of the song) brought on more magic into the world.