Its an often talked about but sadly impossible feature.
A somewhat close workaround you can get is to make factories turn into another unit when captured. As an example, factory_captured could be what the factory becomes when captured. You can then create an option to build factories at a reduced price by consuming a factory_captured.
I had a whole system of triggers in mind to try to overcome this. I had the idea that a hostile “sabotage unit” with strategic bombardment ability (to damage the captured factory) could be placed on the territory after factory capture. And have a fake player have combat rounds after every single player's combat rounds. But I ended up realizing that the unit would not make a bombing combat move and it would therefore not strategically bombard the factory.
I think it is a dead end. Unless you are thinking something else with triggers?
Currently there is no way to check for bombing damage in a condition, or apply it via a trigger. The only ways it can be done is by a player doing a bombing run, or using edit mode. So to have literal bombing damage on capture, you would need code changes.