I have done similar things, but I never have used b4r. I use BASCOM-AVR which is very similar and has been around since the mid 90s. As far as a CNC, Why wouldn't it be doable? One of the projects I had done was slightly more simple, but still complex and that was a brushless-DC ECM motor controller. Not exactly easy but doable in BASIC. I did this as a retrofit controller/driver for the one that failed in my washing machine (common problem on new stator-style machines). Then I adapted it to the frequency pulse modulation used in GE fridges with Embraco brushless ECM compressors. Those "gray boxes" drop like flies on those things.
Speaking of CNC, I maintain one at work which is now a 20+ year old machine with the manufacturer long gone, support long gone and I have done enough patch work with an AVR to keep that thing running surprisingly. uses a proprietary motion control card with tons of Altera CPLDs. the AVR serves a simple task by telling the motion controller where home is as well as controlling the motor brakes. (the original PCB that did this died) so I had to replicated its function.
Then the servo amplifier died and I had to fix that. luckily it was just leaking capacitors in one of the 5V switching regulator circuits cutting the supply to the logic ICs.