You need a powerful motor for rigid tapping - 3Hp+ anti needs to be slow not like a router, then you need some rotational feedback from the spindle, a motor controller that can rapid start/stop, a cnc controller that can do rigid tapping like a CSMIO-IP/A or S etc.
I did this on my Bridgeport mill and it works well but its not a router.