Here are some
repair prices for steel and Ti so you can see the cost-effectiveness.
Calfee repair carbon frames.
The common location for frame failure is drive-side chainstay, not a safety critical location for normal riding. People have done home repairs on all kinds of frame material using glass or carbon fibre tape wrap and epoxy. Its not something to attempt on the front end where a failure can dump you, or for off-road use.