So, a bit of a reminder on the history of the Empire. The Empire once united the whole of the continent under its rule. This means that originally the Empire was fighting wars with other factions of humanity to conquer them and succeeded. This period of conquest ended (according to Flamme) when the Demon King appeared and started uniting the demons. The demons' homeland is actually closer to the imperial capital in the north than the capital is to the rest of the continent, so probably the Empire was forced to withdraw its forces from the south and central regions to fight the demons, leading to independence for the states previously under their control there. The Empire then instituted a policy of persecution against the mages because they considered all magic not originating from the Goddess to be the same - i.e. demonic. This came from a misunderstanding of how demon curses worked. You might ask how the Empire would have been able to fight the demons then, but actually Goddess magic contains a lot of spells that could be used on the offensive, and priests blessed by the Goddess are literally immune to non-physical demon curses (and probably some physical demon magic too). This was enough for a while.
What changed was that Flamme was then able to convince the Empire to start employing mages, and they responded positively by granting mages the same respectful position in society priests had. This may be why the identifying marker of the Great Mage inherited by Frieren from Flamme is a Holy Emblem - the Empire was basically saying Great Mages were the same as high priests in status. Using the Imperial Mages, the Empire was not only able to fight off the demons but actually regain territory and expand again in the north. They also had a warrior nobility and a knight corps who were at least as strong as, and in many cases stronger than, heroic warriors like Himmel and Stark. Once the DK was defeated by the Hero Party, things even turned bad for the demons, with Imperial Knights actively hunting down demons who continued to make trouble for the Empire. When Macht faced off with the knight hunting him down, the assumption was that even a Great Demon like him should have been worried that the knights were starting to actively hunt him. Of course, Macht was so powerful that this was never the case for him (and the knight very badly underestimated him). However, it's clear from their conversation that the knights were usually enough to even threaten Great Demons. After all, Solitar thought Himmel was strong enough to take her out by himself, although at the cost of her death rampage wrecking the world. Some knights might actually be as strong as Himmel and might have been able to take down Solitar-level Great Demons.
However, this is all from over 50 years ago. During the intervening time something happened in the mighty Empire. The warrior nobility like the Armee family started losing power. The Imperial Knights who once could challenge Great Demons are no longer as effective or powerful. The Imperial Mages seem to have degraded in quality and numbers through infighting in the court, with some of the most powerful straight out being ostracized and ruined as shown in Denken and Lernen's flashbacks. The rot has set in and the Empire seems to be in decline from the usual human infighting.