It is not permitted to think about Torah in the bathroom regularly, but what about Purim Torah, which is certainly not real Torah study, but still often refers to actual Torah?
One might think that it would be forbidden because the person would still be thinking about the actual texts. On the other hand, one might think that it would be permitted because the person is not actually learning in the bathroom.
I do not know if it is as simple as this, but the distinction that I made in the comments below is that this comes down to the specifics of what one is normally not allowed to do in the bathroom. Is it just thinking about the words that is forbidden, or is it actually thinking about real learning that is forbidden? Perhaps neither of these is correct or sufficient to answer the question.