How sensible is it to try and program a machine to cut out the lock end of a gun? and what kit do I need to do it?
It would be easy to do as compared to doing it by hand. There will be some hand work but minor.
If I were to do it i would just make a drawing of the pockets required and use a program to generate the code for the pockets.I say pockets because because there may be more than one.
There are a couple of options. You use CAD to create a dxf file, import it to a program such as LazyCam, Cambam,cut2d,
etc and generate the code for the machining for use by Mach.
Another way would be to use Copycat which uses a webcam to trace the lines of the lock. and while doing that you assign the cut depth and Copycat generates the code on the fly.
There are other ways but the above give you some options to explore.
So you have some learning to do.
Have fun,
RICH