How to assess safety of carbon frame after crash?
The first thing is to clean the entire frame and fork very carefully and look for cracks or irregularities. I like to use something like a squirt bottle silicone cleaner/polish for this, along with a microfiber finishing rag, because it kind of normalizes the surface and makes things easier to pick out. Look extra carefully all around the joints, particular of the chain and seatstays, which is a place where rear end impacts are particularly likely to cause cracking on carbon road bikes in my experience.

If you find anything where you can't tell whether it's a crack in the frame or just the paint, chip away the paint to look underneath.

Presuming you find nothing, you're faced with an ambiguity that is best considered to be part of the cost of admission to carbon bikes. In other fields there are ways of using x-rays to look for unseen damage to carbon fiber structures, but it's considered impractical for bikes cost-wise and is not done. All anyone can do is guess.