BDA, the drilling through and or use of a castlegated is a useful idea and I will keep up my sleeve. As you have done I would leave in the hands of a machinist if I go down this route
I'm sorry I didn't notice this before but my suggestion does not use a castellated nut. It uses the standard nut.
The hole is drilled laterally - not radially (in other words, in the direction of the stub axle) and the hole goes through the threads of both the nut and the stub axle. It would be tapped for 10-32 or 8-32 and a set screw is screwed into the resulting hole. The set screw would have to shear in half for the nut to rotate.
I think a castellated nut is a bad idea because to use that, you would drill a hole through the stub axle. When you tighten the nut, the hole in the stub axle and a castellation may not line up and while tightening the nut further to line it up might not hurt if it's not too tight, loosening it certainly will.