Unfortunately, carbon fiber frame failures happen often enough on DIY mid drive builds that its common practice to warn people away from them when someone asks whether to go that route. Even if it involves a bespoke-to-the-motor frame and not something hanging off the bottom bracket like a BBSHD.
C/F also often fails spectacularly. An old adage when it comes to frame construction: "Steel bends. Aluminum snaps. Carbon fiber shatters." That may be a bit dramatic insofar as c/f is concerned, but not by much. Myself personally I've had a c/f seatpost split on me, which a) made me think in horror about the kind of bodily injury I could suffer if I came down on splinters and b) caused me to examine my priorities and remove c/f handlebars and stems on various bikes and switch back to alloy.
My favorite meme on the subject of bicycle frame material: