The dark side of reality is that people so evil intentionally. Evil dwells within us and comes iut in words/actions against peoppe and in defiance to God. Believers must not downplay evil, but we must also not let it take our focus from God.
At the core of God's being is love and goodness. It is something He intends to bless others with it for our good and His glory.
God turned the opposition against Joseph and Himself and overruled the outcome from evil to fulfill His will. He wasn't the author of evil, but is able to change the outcome to serve His divine plan. The people that oppose God end up contributing to His will.
The challenge is to exercise faith in waiting for God to reveal the good that will come from the trials we face. We may not get to see the reasons in our lifetime.
Joseph comforted his brothers that God was able to take their worst sins for His greater purpose. Encourage yourself and other believers that there is no sin that Jesus' blood cannot conquer. Humbly accepting God's power over all these things can free us from Satan's schemes to separate us from God.