Luk 22:42 saying, “Father, if you are willing [2], remove this cup from me. Nevertheless, not my will [1], but yours, be done.”The evil that happened to Joseph was obviously within God's perfect plan. It was part of His will.
As John Piper differentiates, there are 2 different words in the original texts that are translated as the same word "will". This is best distinguished as God's desire (will1) and God's counsel (will2), their relation seen in Eph 1:11. These are also termed God's perfect/preceptive/prescriptive Will [1] and God's permissive/decretive Will [2] respectively.
The evil that happened to Joseph was within God's plan/counsel/will[2]. Was it God's desire/will[1] though? Even calvinism holds that God's desires are not always fulfilled which God has so counselled as per His preceding sovereign purposes.
Arminians keep pointing to God's will [1] not being fulfilled at times and Calvinists keep pointing to God's will [2] always coming to pass and there's simply semantic talking past each other unless we identify the exact Will we're each referring to.