Some of the additives in grease can in theory cause delamination between the epoxy and the carbon. Ive never heard of any issues using bike grease, maybe if you use some of the nasty petroleum based greases from the automotive trade there might be an issue.
I think a lot of it comes from carbon seat posts saying do not grease, you need to use assembly paste because you cant wrench the post up like a metal one. Assembly paste is just grease with gritty bits in. But if you grease a carbon post you’ll need far too much torque to stop it slipping which is far more dangerous.
Trek specify grease on carbon and they’re probably the most experienced carbon bicycle manufacturer so id have no concerns.