Did he really think going into this that the Republicans would have him on the run?
No, people like Mueller are cocky and confident, and Mueller lives in a world where people are telling him how wonderful he is.
So if he had all his faculties about him, it's unlikely that he'd be so frightened of the Republicans that he'd pretend to have dementia.
That's not to say that he couldn't have played up his mental problems to avoid answering questions, but I doubt that it was all an act.
If he knew he was dirty as hell and that Barr was on his trail, then yeah, I dont think he would hesitate to pull a too senile to know what his people were doing act.