that's an interesting argument, a wrong argument but interesting none the less. Metals fatigue, all metals including titanium. So in reality no bike will last forever. All things being equal and a carbon and titanium bike are ridden the same number of miles without crashing on the same roads then they should last the same amount of time. Unless one of the bikes crashes or a crack develops in the carbon I don't see how the mechanic could make such a blanket statement like that.
Now if you're talking about abuse, drops, crashes, etc. Then yes a carbon bike won't last as long. carbon is designed to be strong for particular tasks so a lateral stress would speed up the process of shortening the life span of a carbon bike.