It is true that one bad apple can and does spoil the barrel.
The Bible says, "A little leaven leavens the whole lump." (Galatians 5:9)
But, also, it is written >
"Let all bitterness, wrath, anger, clamor, and evil speaking be put away from you, with all malice." (Ephesians 4:31)
So . . . even though it is possible for one bitter person to get everyone else bitter, it is possible with God to put away that bitterness, so it does not spread.
"looking carefully, lest anyone fall short of the grace of God; lest any root of bitterness springing up cause trouble, and by this many become defiled." (Hebrews 12:15)
So, the Christian morality is that you become an apple which can not be spoiled by a bad apple. Because you are living in God's love which can not be spoiled by evil > as it is guaranteed >
"Love suffers long and is kind," we have in 1 Corinthians 13:4. Plus, love "bears all things" and "endures all things" (in 1 Corinthians 13:7). And so, in God's love we have His own immunity almighty against howsoever evil things would corrupt us > as it is also written >
"And who is he who will harm you if you become followers of what is good?" (1 Peter 3:13)
Plus, we have how an obedient Christian wife "without a word" can win a disobedient husband > 1 Peter 3:1-4. Included in how she does this is she has "the incorruptible beauty of a gentle and quiet spirit, which is very precious in the sight of God." (in 1 Peter 3:4) In the "incorruptible" beauty of God's gentle and quiet love, she can not be corrupted by the bitterness and other disobedience and abuse of a wrong husband. Plus, because she is in power of God so superior to her husband's power, she can spread her spiritual good to affect him to become obedient. Because >
"He who is in you is greater than he who is in the world." (in 1 John 4:4)
After all, if it is possible for inferior Satanic stupid stuff to spread to change people, then surely we in God's love can spread His affect . . . of His grace to change people's character so we are strong and pure in Jesus and His way of loving > and 1 Peter 4:10 to me shows that every child of God is able to minister this grace >
"As each one has received a gift, minister it to one another, as good stewards of the manifold grace of God." (1 Peter 4:10)
Therefore >
"Do not be overcome by evil, but overcome evil with good." (Romans 12:24)
With God, we have "good" which can overcome any evil, at all. And so, if I can be affected badly by an evil person, this is my own fault: I need to trust Jesus and receive however He corrects my character so I am safe in sharing with Him in His love > as is guaranteed to every child of God >
"Love has been perfected among us in this: that we may have boldness in the day of judgment; because as He is, so are we in this world." (1 John 4:17)
This is possible with God, and basic to what happens while we obey God . . . I mean obeying how God in us is succeeding >
"for it is God who works in you both to will and to do for His good pleasure." (Philippians 2:13)
"Therefore submit to God." (in James 4:7)
This is guaranteed; so we are wise not to accept and excuse less.