While I have never used the API for segment creation... my suspicion is that this use case is "sort of possible"...
By that, I mean I really can't see there being a way to "save" a segment inside a segment so that it auto updates... since the way that segments are saved doesn't seem to support a proper linkage (I don't see how using the API would allow them to save a different way to be honest)... however, assuming all segment updates being done by the API... I suppose you could create a logical mapping of segments inside of segments... so that:
IF Segment A is updated
- The mapping file might tell you that segments B, D, F and H have "A" inside of them (and the bounds of A)
- Then automatically update the portion of the above segments with the new "A" logic
I would assume it would be easier to keep the mapping as simple as possible... so that if there are Segments with B, D, F or H inside them would also indicate that they have A, so that you don't have to do recursive checks for segments containing B, D, F or H... but that might be needed... I mean, what happens if you make a change to B that removes Segment A and replaces it with an alternate... how do you break the "A" connectivity...
So you might be better doing nested to nested checks up the chain....
Either way, creating a way to document how the segments link together, and a process to update the portion of the segment that is nested is going to be tricky....