That kind of visual stunt is done with EDM (electrical discharge machining). It’s not actually about higher precision. The trick works because EDM creates high quality surface finishes easily with no edge burrs, and can do so on complex forms. You can get a fit like that with traditional machine tools, it’s just a lot more work.
This tiny Rubik’s cube could be done on most standard machine tools. It’s much easier than, say watchmaking work.