so are there multiple cutcontour shapes, some of which are not located on the "cutcontour" layer?
could you just select the artwork on the cutcontour layer and call it a day?
If not, you'll likely need a recursive approach, because if the cutcontour lines you're looking for are nested inside of groups (potentially deeply nested), the only way to find them is to search each nested group to see if it contains any cutcontour paths.
Another possible option is to set your selection to null, then set the "default stroke color" to cut contour, then use executeMenuCommand to select all same strokes. that should select all of the cut lines for you (but depending on what you want to do with them later, selecting them this way is not always the best choice).
mydoc.selection = null;
mydoc.defaultStrokeColor = mydoc.swatches["CutContour"].color;
app.executeMenuCommand("Find Stroke Color menu item");