I believe judging in correcting one another in Christ's love, seeing the professing believers as saved and just astray is paramount as opposed to judging in condemning the professing believer as if he or she is not saved at all. Excommunication is a final resort punishment applied by the whole church in the hopes of leading those astray to repentance so that is done in Christ's love also.
As every believer is to be submissive to the Word of God, so is the church, otherwise, discipleship would hardly exists in the church and fellowship with workers of iniquity would not be really fellowship with the Father & the Son in worship or in fellowship with others.
Withdrawing from the church should only be based on when red tapes prevents the church coming together to discern and to reprove the works of darkness from their church's teachings,words, and practises. If prunings cannot be done because of side stepping bureaucrats or the church as a whole does not want to make waves and so make excuses for the iniquity within of the church or by a fellow church member like.. nobody's perfect...so no church is perfect...or you are not perfect either and so saying that was to just to gloss over iniquity, you may want to ask the Lord Jesus as your Good Shepherd, what to do next; but I am betting it is to withdraw, and even I needed His help to do a simple thing like that because it is hard to withdraw from a church you had grown up in for most of your life, but it can be done by His grace & by His help.
When apostasy is said to be abounding in the latter days when faith is hard to find, it should not be surprising that a church which means "called out" from the world will have believers called out from the church when the church is of the world, and not being submissive to the Word of God.
Yeah.. no church is perfect, but running that race is about looking to the author & finisher of our faith to be perfect; not ignoring the iniquity, and thus not running at all. And just because a church does prune to bear fruit, Jesus said that even fruit bearing disciples will be pruned to bear even more fruit. It is a learning and growing process when one is running that race by faith in the Son of God.
John 15:1I am the true vine, and my Father is the husbandman. 2 Every branch in me that beareth not fruit he taketh away: and every branch that beareth fruit, he purgeth it, that it may bring forth more fruit.
The consequence for not abiding in Him & His words as kept by those that loved Him & His words in the KJV as His disciple is being left behind to face the coming fire on the earth and the subsequent great tribulation.
John 15:3 Now ye are clean through the word which I have spoken unto you. 4 Abide in me, and I in you. As the branch cannot bear fruit of itself, except it abide in the vine; no more can ye, except ye abide in me. 5 I am the vine, ye are the branches: He that abideth in me, and I in him, the same bringeth forth much fruit: for without me ye can do nothing. 6 If a man abide not in me, he is cast forth as a branch, and is withered; and men gather them, and cast them into the fire, and they are burned. 7 If ye abide in me, and my words abide in you, ye shall ask what ye will, and it shall be done unto you. 8 Herein is my Father glorified, that ye bear much fruit; so shall ye be my disciples.
Saved believers running that race by faith in Jesus Christ is how they live that reconciled relationship with God through Jesus Christ as His disciples to be chosen for the Marriage Supper or get left behind at the pre tribulational rapture event when God judges His House first because Jesus taught excommunication, and if they do not correct the unrepentant or that the unrepentant refused correction but the church still did not issue the punishment of excommunication, He will excommunicate at the pre trib rapture event as Paul symbolizes what fellowship will be like at the Marriage Supper with no unrepentant believer there in 1 Corinthians 5th chapter even though he is still called a brother so as to not be treated as the enemy; 2 Thessalonians 3:1-7,14-15.
John 15:12 This is my commandment, That ye love one another, as I have loved you. 13 Greater love hath no man than this, that a man lay down his life for his friends. 14 Ye are my friends, if ye do whatsoever I command you. 15 Henceforth I call you not servants; for the servant knoweth not what his lord doeth: but I have called you friends; for all things that I have heard of my Father I have made known unto you. 16 Ye have not chosen me, but I have chosen you, and ordained you, that ye should go and bring forth fruit, and that your fruit should remain: that whatsoever ye shall ask of the Father in my name, he may give it you. 17 These things I command you, that ye love one another.
Matthew 22:11 And when the king came in to see the guests, he saw there a man which had not on a wedding garment: 12 And he saith unto him, Friend, how camest thou in hither not having a wedding garment? And he was speechless. 13 Then said the king to the servants, Bind him hand and foot, and take him away, and cast him into outer darkness, there shall be weeping and gnashing of teeth. 14 For many are called, but few are chosen.
John 15:6 If a man abide not in me, he is cast forth as a branch, and is withered; and men gather them, and cast them into the fire, and they are burned. 7 If ye abide in me, and my words abide in you,......8 Herein is my Father glorified, that ye bear much fruit; so shall ye be my disciples.
So the job of the church is what? Showing Christ's love for one another in discipleship & not just fellowship.
Colossians 1:27 To whom God would make known what is the riches of the glory of this mystery among the Gentiles; which is Christ in you, the hope of glory: 28 Whom we preach, warning every man, and teaching every man in all wisdom; that we may present every man perfect in Christ Jesus:
1 Corinthians 1:9 God is faithful, by whom ye were called unto the fellowship of his Son Jesus Christ our Lord. 10 Now I beseech you, brethren, by the name of our Lord Jesus Christ, that ye all speak the same thing, and that there be no divisions among you; but that ye be perfectly joined together in the same mind and in the same judgment.
2 Corinthians 5:9 Wherefore we labour, that, whether present or absent, we may be accepted of him. 10 For we must all appear before the judgment seat of Christ; that every one may receive the things done in his body, according to that he hath done, whether it be good or bad. 11 Knowing therefore the terror of the Lord, we persuade men; but we are made manifest unto God; and I trust also are made manifest in your consciences.
May we point every saved believer to Jesus Christ in trusting Him as their Good Shepherd in running that race.
1 Thessalonians 5:21 Prove all things; hold fast that which is good. 22 Abstain from all appearance of evil. 23 And the very God of peace sanctify you wholly; and I pray God your whole spirit and soul and body be preserved blameless unto the coming of our Lord Jesus Christ. 24 Faithful is he that calleth you, who also will do it.
2 Timothy 4:18 And the Lord shall deliver me from every evil work, and will preserve me unto his heavenly kingdom: to whom be glory for ever and ever. Amen.