That is a concept that I have wondered about, too. If your machine is capable of rigid tapping, this would mean that it has a spindle encoder which should enable to you grab an index pulse for synchronization.
Whether you have the freedom in your controller to initiate synchronization between the spindle and some other axis movement would be the big hurdle to overcome.
I don't think an existing G84 macro itself would work (because of the retraction), but something akin to the lathe G33 cycle might be closer, where every move is commanded, and the G33 enables the synchronization.
In a Pc based cnc solution, it would likely not be difficult to write the logic for it, but I don't know how easy it is to "break into a black box controller" and mess with unusual electronic gearing between various axis.