You buy a new bike. The bottom bracket makes a funny noise and needs replacing. For many other product categories (computer with a noisy fan, ...), you'd worry you had a lemon on your hand. It would be safer to return the full item and request a new one. But a bike will typically be treated like a car. An exchange-for-new is not possible after you've ridden it (beyond a test ride/drive). Do you have any concerns that hammering the sealed cartridge bearings out of the bottom bracket in a carbon frame will result in a product lesser in any way than a new one out of the factory?
I have some theoretical concerns with the repeated installation of press fit BB cups in carbon frames. I don't know to what extent the bearing seats wear down as you remove the bearings. Perhaps it depends on the cup material. Delrin cups may have been used to accommodate looser tolerances since they can deform a bit, but I would assume they would also cause less wear on the way out than a metal cup would. If the cups do cause wear on the bearing seats, that will enlarge the seats over time, and that could contribute to eventual creaking. The wear might also be asymmetrical, e.g. if the cup accidentally gets knocked out at a bit of an angle - I assume a good mechanic will avoid this. BB standards that directly seat the bearings in the frame (e.g. BB90; not sure how many more there are) could magnify this concern.
I don't know how many press fit BBs there are which allow you to either service the bearings while the cups are installed, or to remove the bearings from the cups and replace them. That would obviously spare the shell from any potential wear.
Many firms are migrating towards threaded BBs due to consumer distrust of press fit systems in general. To a large extent, the industry has earned that distrust, even if there are firms that can make press fit to high tolerances. Anyway, there may also be some theoretical problems with bonding in an aluminum shell. Improper bonding could fail. I know one guy with a direct to consumer mainland Chinese frame whose BB shell disbonded for no apparent reason. Also, aluminum and carbon are dissimilar materials, and they can corrode. There are probably more theoretical issues engineers could identify, though.
Overall, this may be one of those potential issues that people can live with in practice. Aluminum's finite fatigue life, steel's propensity to rust, the history of weld contamination in some titanium frames, carbon fiber's vulnerability to direct hits - you could probably name more issues for each frame material.
Servicing press fit bearings is expected periodic activity. The bearings are designed to be installed and removed, and the bike frame is designed around this expectation. A part of the frame design accounts for the amount and type of forces required, and acceptable mechanism of how these forces are achieved. In the case of press fit bearings, a bearing press, used correctly, will not exceed design specification. Hammering them out works, with some but not full control of the forces. It is not professional, but given design margins, if done carefully has relatively low risk of damage.
This all completely unlike a car crash - where the forces are uncontrolled in every aspect, from amount of force, angle of force, and duration. It is simply not possible to build any frame (not just carbon) that can withstand any crash. Frames are designed to withstand reasonable wear and tear, and small knocks and bangs, minor crashes, riders falling off, are all a part of it. A car running over the bike is not. Problem with a car running over a bike (or part of a bike) it simply is impossible to know what those forces were.
While carbon frames are much stronger than many riders think, so are the forces generated in a car crash, hence the advice given in that question.
Consider that the forces to remove a bearing should be about the same magnitude as the forces required to install it initially. Maybe less, maybe a little more, but not 10x as much.
If the installation of bearings is enough to render damage to a frame, then how does any carbon bike get assembled? You are trusting to the expertise of the mechanic/assembler to use no more force than required. If the bearings are pushed in steadily with a press then the peak forces are lower than if they are hammered in, and more spread-out.
By comparison, the forces of a vehicle collision or a crash are not measurable - they could be far higher or lower, you just don't know. Also they happen in a very short time, resulting in high peak loads which is where things start to break.
I'd be more leery of a backyard mechanic with a hammer and drift, over a LBS mechanic who does this stuff frequently and has the right tools for the job.
I am far too sleepy at the time of this writing to start calculating peak forces and stuff, so let's approach this more casually. To begin, it should immediately be obvious that getting your bike run over by a car is evidently not the same situation as a skilled mechanic whacking out frame bearings with a mallet. Claiming equivalence here would be somewhat illogical. Also, assuming your frame bearings aren't stuck in the frame, the peak force will be greatly reduced as the bearing moves. Car collisions probably won't have as much "give" involved.
Yes, there is a risk of damage, but realistically only as a result of a mistake. If you miss your hammer swing and just straight up hit the frame, I could see that causing some problems.
Note that the linked question also has a special nuance, namely that insurance is involved. I'm not even going to pretend to be knowledgeable in the field of filing insurance claims, but from my understanding, any admittance of "it's not actually a problem" can be used against you to reduce your payout. The author is incentivized to prove to the insurance company that their bike is now unsafe (and that's exactly what they're trying to do)--they're not trying to prove that the bike may still be ridable.
Also, I'm not sure which headset on a carbon frame requires hammering to remove the bearings. Usually, carbon frames use IS headsets with the bearings just sitting there.