It’s also possible that it’s not possible even on an infinite time scale. A quick example: if you asked an algorithm to choose a number, and you choose 6536639876555721, but the algorithm only chooses from the infinite number of even numbers, it will never choose your number. So for the monkeys, if they are just not ‘programmed’ to ever be able to write a whole Shakespeare play, they will not be able to even with infinite time and infinite moneys.
I see what you’re saying, but I do think they would have behavioral ‘rules’ that would stop them even on an infinite time scale. It would work if monkeys were capable of pressing one letter at a time, walking away, and pressing another letter and so forth… and while that’s of course physically possible for the monkeys to do, I don’t think it’s actually possible because they are susceptible to their own behavior. Not saying they would never type one specific letter, but a better example would be the behavior of rolling their finger/hand while pressing a letter, such that a conglomeration of letters are pressed in a way that would never match a Shakespeare play.