This discussion on the relative virtues of carbon v ally is largely focusing on the materials and in my opinion....and experience that is not really the defining factor. The defining factor is the expertise of design and construction.
Both are far easier and lower cost to achieve well with ally given that both hydro tubes and frame construction can be largely automated and replicated. Assuming the design and construction method has no flaws, every frame is almost guaranteed to perform the same. Failures on ally frames are mostly due to design failures and will occur in every frame with that design flaw. Design flaws include using inappropriate welding techniques!
Any carbon composite construction is fairly labour intensive and far more expertise is required in the design. Decisions need to be made about the modulus of carbon to be used in whatever mat format, and in what combination and orientation, and whether to incude other materials such as glass or kevlar, and how to integrate component fixing points.
Both materials can be designed to be either stiff or allow some flex, however the degree of stiffness that can be achieved with ally ( with different hydro formed tube shapes) is limited by the grade of ally used. The majority of bike frames use 6xxx series ally which better enables shaping and welding ( TIG)........meanwhile 7075 series ally is both lighter and stronger/stiffer but is much more difficult to both shape and requires a special technique and filler to weld.
My experience with carbon composite is largely with windsurfing equipment where boards, booms and masts can all be made with carbon. A 100% carbon mast 460cm long is fabricated on a mandrel in spiral format using pre preg. It is designed to bend to extremes under the load of full race sails ...with fast reflex. A 100% carbon boom meanwhile is made to be super stiff such that it does not distort under load from the sail....which would alter the outhaul setting. A full carbon board is very light and very stiff......and very fast, but very harsh to use for extended periods! My lesson from decades of buying and using this type of kit is you get what you pay for and there is no such thing as a cheap carbon board, boom, or mast. If the product is indeed 100% carbon it is brittle, meaning any blunt impact can damage the structure, and not necessarilly with any visual damage, and not necessarily leading to immediate failure....that could come at any time thereafter. My buying decisions were based on full knowledge of the composite design.....100% carbon or a mix with other materials, what modulus of carbon, what weave ( UD/matrix etc), what layup process ( wet/pre preg), what epoxy, ........who made it! There is no way I would buy a carbon component without that information.