One of the points missed in this thought experiment is the power of the infinite.
We have people describing God as infinitely powerful, but they themselves do not appreciate what infinite means.
Infinite means unending. In an unending string of letters, numbers, characters and spaces, the works of Shakespeare do appear.
They appear because the string cannot end until they do; as well as every other combination and near-combination that can possibly come about.
God, of course, would have no such constraints which puts science and mathematicians at a certain disadvantage. Such is life!
Which is why there are some scientists who posit a multiverse where infinite time and infinite space keeps the monkeys banging out complexity by random chance at their lesiure.
Given infinite time, space and monkeys the mathematical proof that they will type a sonnet is pretty simple. Unfortunately we are stuck with finite limits while God isn't. I know, I know, it isn't fair that science has to deal with the laws, time and space that the Good Lord gave them but there it is anyway.