May not be exactly what you are looking for but with SimplyCam available from MR-Soft Nc Software Tools you can do what you want by choosing multiple cutting profiles for the same vectors, changing the depth for each DoC and then using the "Reverse" setting to change the start and end point for the cutting profile.
You can also tell it to cut all vectors at the same depth so for multiple vectors, they all get cut at the first depth, then the next profile would use the second depth and the reverse setting and so-forth.
Depending on how complex your drawing is there could be quite a bit of manual steps on your part to tell it how to do the cuts but using different layers of the same vectors for the "forward" and "reverse" cut directions might make it easier to manage.
In some cases, you could possibly do the above for the first forward and reverse directions, then use a text editor to copy the text blocks to change/increase the DoC parameters because the X and Y motions would be the same.
If you have a somewhat basic sample DXF file I'd be happy to try it and post a code sample (sounds like an interesting idea). If you do, let me know the order in which to process because with SimplyCam you can also select the order of the vectors.
It can open and save to DXF files.