Hello john,
I did similar task (engraving in uneven parts with minimum engraving depth, but all within the material) by the help of limiting z depth. The G-code contains a much too deep z value and by limiting z to e.g.-0.10 and slightly increasing this limit (-0.15, -0.20) I got the required result.
Holger