Check out Steve Howard’s galleries for some pictures of some of the machining steps he uses to make hubs and things.
The splines on the KH axle are machined, probably on a CNC mill.
Aluminum is probably too soft for a unicycle axle. If it’s a unicycle that will not get any abuse then it might work. Titanium is also considered too weak for an axle that will get abuse (jumping and trials). Steve Howard has used 17-4PH stainless steel for unicycle axles because it can be easily heat treated, but it’s expensive stuff. Most unicycle axles are heat treated steel.
Internal threading is usually accomplished with a tap. However, if it’s a large thread it must be done on a lathe with a single point threading tool. Set up can be tricky. Most good machinists know how to do this though.
Teflon can take temperatures up to about 400 deg. C. It machines well and can be run much faster than steel. If you could manage to get it hot enough to start smoking (not likely with standard machining), get out of the building quickly. The byproduct of burning teflon is toxic.
Profile offers a titanium axle for their race cranks. It’s not as strong as the steel axle and does not have the lifetime warranty.
So yes ti can be used. Just don’t expect it to hold up as well as a hardened steel axle.
Using an oversized ti axle would give it more strength and it would still probably be lighter than the equivalent strength smaller diameter axle in steel. You’d have to do the calculations to figure out what diameter you’d need to equal the strength of a steel axle.