First question, is a CompoundCurve a unitary geometry, like a LineString, or is it a collection of geometries. Internally in PostGIS it is structured identically to a collection, and that makes some handling easier, because we just delegate calculations to the collection functions.
WITH f(geom) AS (
SELECT
'COMPOUNDCURVE(
LINESTRING(2 2, 2.5 2.5),
CIRCULARSTRING(2.5 2.5, 4.5 2.5, 3.5 3.5),