No offense at all! In fact I used to think the same thing about the Cardassians-that they were militarily much weaker than the Fed.
Then I saw some things on DS9 that made me see it another way. I'll explain in a few points;
The Cardassian military is very organized- it's large enough that they have it arranged in Orders or fleets. They also have the capacity to build a number of space stations and ship yards.
Gul Dukat seemed capable of directing and winning the war from the station during the war.
Their scientists are very intelligent. They figured out how to remove the minefield. They developed super weapons (on their own) that were effective.
They designed a drone that was nearly unstoppable, and the Orbital weapons platforms that nearly wiped out a combined Allied fleet.
I realized that they have a strong system of organization and discipline that could make them a serious threat.
I'll admit, the problem is, their ships are outclassed by the Federation, and Cardassia is smaller in size than the Federation. Their economy is weaker and dependent on strip mining of other planets. (They also have a brutal self defeating philosophy)
The Fed had a tech advantage. and a much better head start on them.
However-if the Cardassian Union were larger, had more ships, and updated tech, and they had the same system of organization that they had before the war, they would have been a much, much more dangerous match for the Federation.