I think it could be done, but the part that is bolted to engine should absolutely be made of aluminium. Then the carbon S-part attached to it with either glue or some sort of an O-ring connection.
But being that close to exhaust port, you want to have a very good quality laminate with high carbon %.
Years ago I had many US-made carbon pipes, and I never understood why the laminate quality was so poor. As if there had been no compression at all, with very high resin %. No wonder they get pinholes and cracs in use.
In the end we ended up making our own pipes, using proper steel molds and mylar tape compression. They were wonderfully strong.
The only reason I could think to justify the poor laminate quality, would be better (worse, that is) heat transfer behaviour that seems to be beneficial in our use. But that can also be done with correct cooling, or insulating paint.
If I were to make pipes now, or the header S-tube, I’d use a metal- or a hard sacrificial male mold and silicone female piston compression, just like how we do carbon D-boxes, tailbooms and fuel tanks. That way you get the best possible compression. L