"Wisdom is better than weapons of war: but one sinner destroyeth much good." (Ecclesiastes 9:18)
Consider Israel.
Joshua chapter 7
[1] But the children of Israel committed a trespass in the accursed thing: for Achan, the son of Carmi, the son of Zabdi, the son of Zerah, of the tribe of Judah, took of the accursed thing: and the anger of the LORD was kindled against the children of Israel.
[2] And Joshua sent men from Jericho to Ai, which is beside Beth-aven, on the east side of Bethel, and spake unto them, saying, Go up and view the country. And the men went up and viewed Ai.
[3] And they returned to Joshua, and said unto him, Let not all the people go up; but let about two or three thousand men go up and smite Ai; and make not all the people to labour thither; for they are but few.
[4] So there went up thither of the people about three thousand men: and they fled before the men of Ai.
[5] And the men of Ai smote of them about thirty and six men: for they chased them from before the gate even unto Shebarim, and smote them in the going down: wherefore the hearts of the people melted, and became as water.
[6] And Joshua rent his clothes, and fell to the earth upon his face before the ark of the LORD until the eventide, he and the elders of Israel, and put dust upon their heads.
[7] And Joshua said, Alas, O Lord GOD, wherefore hast thou at all brought this people over Jordan, to deliver us into the hand of the Amorites, to destroy us? would to God we had been content, and dwelt on the other side Jordan!
[8] O Lord, what shall I say, when Israel turneth their backs before their enemies!
[9] For the Canaanites and all the inhabitants of the land shall hear of it, and shall environ us round, and cut off our name from the earth: and what wilt thou do unto thy great name?
[10] And the LORD said unto Joshua, Get thee up; wherefore liest thou thus upon thy face?
[11] Israel hath sinned, and they have also transgressed my covenant which I commanded them: for they have even taken of the accursed thing, and have also stolen, and dissembled also, and they have put it even among their own stuff.
[12] Therefore the children of Israel could not stand before their enemies, but turned their backs before their enemies, because they were accursed: neither will I be with you any more, except ye destroy the accursed from among you.
The nation of Israel was being defeated in battle BECAUSE OF THE SIN OF ONE INDIVIDUAL, and they didn't experience victory again until that one sinner was dealt with.
Again, "a little leaven leaveneth the whole lump" (I Cor. 5:6).
In my particular case, I gave the example of leaven (yeast) in pizza dough, and how just a "little leaven leaveneth the whole lump".
Have you ever baked bread, a cake, or cookies?
If you have, and if you've added "leaven" to the mix, then that is precisely what caused the bread, cake, or cookies to become "puffed up" (I Cor. 5:2).
"Puffed up" is not used in a positive light in scripture.
Instead, it's symbolic of PRIDE or whenever we exalt our own ways above God's ways.
Your entire church is quite possibly/probably suffering defeats because of the sins of members within the congregation which have not yet been repented of. These members need to be confronted. If they repent, then they can stay. If they don't repent, then they need to removed from the congregation until they do repent.
This isn't a game. It's a war.
As Christians, if we've truly partaken of Christ as our Passover lamb (I Cor. 5:7), then we need to "purge out therefore the old leaven, that ye may be a new lump, as ye are unleavened" (I Cor. 5:7) or remove anything from our midst that is going to cause us to be "puffed up" (I Cor. 5:2) or PROUD in rebellion against God.
Unless we do the same, we can kiss victory in battle good-bye.