I think the form of 'grammatical joke' he has in mind is based on the 'grammar' of a sub-language or language game, not of a natural language, when we make a move in one language game that would be absolutely perfect in a different game, but is totally wrong in the game in question.
Like the Monty Python argument about whether the argument being paid for qualifies as an argument, and not just flat contradiction, even though it consists of different phrasings of a flat contradiction, the starting of which causes the customer to be charged for an additional argument, because otherwise the professional arguer has to stop arguing.
The notion of paying for argument as a performance wraps around and becomes absurd, the one is part of one kind of reality, the other is part of another. At a certain level, the very best forms of this kind of humor do strike me as deep, until I unwind them. And the misunderstanding, of course, needs to be novel. Another take on the used trope does not work over and over again.
He references this kind of absurd performance as a joke in the Blue Book, and I am pretty sure this is still the general idea. I am hoping the word is not really about humor, because they are not good jokes, even for back then. Then again, given the examples of jokes he supposedly liked above, maybe he was just extremely easily amused. And he was German, after all.