I think you are going to need to have some sort of loop or sequence of test scenarios since you want the depth measured in comparison with the unknown daylight elevation.
Based on your sketch, what I would do is set the following Input Parameters:
Foreslope slope (X:1)
Backslope slope (X:1)
Ditch depth (ft)
Ditch width (ft)
Start Test Ditch Offset (ft) (ex. 5')
Test Ditch Increment (ft) (ex. 1')
Then use auxiliary points and auxiliary links to create a ditch using the starting ditch offset with the foreslope and backslope. If it works (AL2.ylength>=1) then you create a point and link, if it doesn't work then you test the next offset using the incremental value. I would set it up to do somewhere between 5-10 iterations.
Now when you are using this subassembly in Civil 3D you can either be happy with your ditch jumping at 1' increments or you can finesse it once you know a certain range is all putting the ditch at 5' with 1' increments then set the range to start at 4' (Ditch offset - increment) and set an increment of 0.1 (increment/iterations), using the Section Editor->Parameter Editor Override. This will help smooth the offset of your ditch.
(Edited to spellcheck)
Kati Mercier, P.E. | LinkedIn | AutoCAD Civil 3D Certified Professional
Pronouns: She/Her
Co-author of "Mastering AutoCAD Civil 3D 2013"
AU2019 Speaker::: CES321590: Analyze and Revise Existing Subassembly Composer PKT Files for AutoCAD Civil 3D
AU2017 Speaker::: CI125544: Analyze and Devise in Subassembly Composer
AU2012 Speaker::: CI3001: Reverse Engineering with Subassembly Composer for AutoCAD Civil 3D
AU2011 Speaker::: CI4252: Create Subassemblies That Think Outside the Box With Subassembly Composer for AutoCAD® Civil 3D®