Have a look at the g38. It has modifiers (38.1,38.2…) that can indicate probe toward, probe away, with or without alarm on failure.
One parameter it takes is the axis to probe. I had it working nicely on my lowrider, but using the default pin as the probe in marlin was a hard fail. I had to explicitly name the pin (even though it was the default) and then it worked great. Only gotcha i can think of.
Marlin has had a lot of development since then, but I don’t know if that was addressed and I’ve been using grbl on my cncs after that.
Sometimes I get carried away with the detail of a question and forget to look for the bigger point. So, disclaimer:
I did it, it was fun, and I learned a lot about marlin and gcode along the way. I probed xy MAYBE a few times, and those were just checking that it worked. I have never, even once, had occasion to probe xy for a job. Turns out most of us like to place stock at a known location on the spoilboard.
Smart money says its a fun project, but won’t be useful.
That said, this IS a hobby for most of us, so if you want a little more info, these might be helpful.
Not by default, but it is possible. Estlcam has this build in. I analyzed if it would be doable with Marlin, and it actually is. It is a matter of doing some touch points and make a custom Gcode command. Was going to experiment with it myself but the life happened:D
The aluminum tape is what i use i cut a straight edge on the left side of my spoilboard for the X zero and use it to set x zero and Y zero the probe for Z zero on cut surface. I have to have a uncut Z surface to do a tool change so i plan that ahead but it works great and 0.01 mm for the tape if i remembered correct got the by measure the tape the then subtracting the backing thickness.