I use the “flood coolant” (M8/M9) for controlling an aux. power supply used only for a Laser. Works great (connected to an SCR which controls power to the aux PSU) . As has been noted, you can’t do this with CM, but with another sender you can.
It’s non-trivial with stock carbide motion board to get this wired up because there isn’t a pin brought out for it. Possible, but fussy. If you don’t consider yourself an expert at solder rework I wouldn’t suggest it.
It’s a lot easier with a different controller board. The process of setting one up isn’t terrible, and if you’re getting to the point you want to manage different external devices, you can probably handle it without a lot of effort, it mostly involves removing the existing connectors from the steppers and limit switches.
Awesome.tech has a new board coming out (they proto everything on a nomad) that has its own display and SD card slot. Their “supergerbil” boards are out of stock, but work well. I recently pushed some changes back to their firmware to improve some compatibility issues. I’ve been using one of these for about a year, but I recently made some silly mistakes (100% my fault) that has relegated it to “the healing bench.” It’s somewhat more difficult to set up than the TR board below.
Another option is the Toms Robotics (TR) board, which I think is easier to set up. Has sockets for internal drivers (available in one of the bundles) or external. Cheaper than the awesome.tech board, and uses a “blue pill” arm cpu that’s easily replaced if you damage it. The F13 board is very much like the standard grbl implementations, but runs on ARM, and has more memory - seems to run a lot smoother, and has one aux. digital output (beyond flood, mist, spindle enable pins). The F14 and F46 boards have a number of additional digital outputs for controlling many external devices. https://shop.tomsrobotics.com/product/f13-bundles/
You can also use an arduino/328 board with a GRBL shield. My first foray from the carbide board was this route. The quality of the shield boards is pretty hit or miss, and doesn’t gain much over the carbide board besides getting easy access to all the pins. Be sure to get a shield that’s compatible with grbl 1.1 (there was a pin definition change).