I’m in agreement with you.God had a plan.
I think it is certain that God had a plan & perhaps it was necessary to complicate it in such a way as to not enable men to undo that plan.
I also think that the reason why the wife’s remarks to Pilate were included was they were to remind us of another wife who tempted her husband. That woman was tempted by the Devil via the snake. I believe that the dream was a temptation given by the Devil in an attempt to ruin God’s plan of salvation.
Not a Bible scholar, but that’s how I see it.