If this is just a simple linear back-off it might be something more easily
done using external offsets as is commonly done for Plasma torch height
control.
Otherwise, If you search the forum for motion.adaptive-feed, you will find a number of people
trying the same scheme for EDM