There is a discussion related to polygon inversions in this postand on growing polygons in this post. Personally, I consider trenching as you describe more a mask post-processing step and I would keep/define both polygon layers at first and do the logical operation at the end. Even though Nazca has its own gds manipulation, at the moment it does not (have to) dive too deep into the specifics of polygon boolean operations as this step can be handled very well by Kayout as a post-process without loosing any design efficiency or inconvenience. Your flow may differ though.
When checking out the PICwriter tool you mentioned, I see it uses gdspy. I guess gdspy handles the polygon inversion in that case. I haven’t used gdspy but I guess you can send the polygons to it, e.g. from Nazca, and get the inversion back. This method should most certainly be doable utilizing Klayout, which can be imported as a Python module. A little code wrapper can make that syntax Nazca conform so you do not have to deal with two interfaces.