Not to sound alarmist or anything, but his brain is probably short circuiting, the repeated phrase not being subject to our natural tendencies to avoid those kinds of loops. Like a broken record, his focus maintains it as if he were saying it anew over and over again, and preempts other forms of attention stealing processing power for spending time thinking and saying whatever phrase it is.
These kind of short circuits are common in children, often as part of their acquisition of language. In falling into those kind of repeating patterns they firmly ingrain the phrases in their developing brain. But the way you describe it, 300 times and counting, requiring all of his attention at once, it does sound like a real problem. I'm not sure how to fix it, aside from being understanding, keeping him informed, and being firm about him not doing that sort of thing. Many people, myself included, are creeped out by people who repeat themselves, as this is often an outward indication of a more dangerous insanity like say, stabbing someone 300 times just because it occurred to you.
The repeated phrases without the psychosis isn't anywhere near as serious as that, but I would counsel you to teach him very carefully when it is a good idea to stop repeating himself. You did say "I think that it helps him remember, but I am not sure." Did you ask him if repeating something helps him remember? As I said, self repetition is an important tool for cementing in a memory, but one must learn to control it, not to let it control onesself.
Oh and yes... I talk aloud to myself all the time. But it's usually a running dialog between my personalities, and not a trancelike, repeated phrase. Being an auditory learner though, I can definitely say that it's easier to remember something if I hear it, even if I'm the one saying it.