So how would you do that with a lathe/mill/ what ever....
Get rid of the bulk of the material with a drill. Next, mill out a pocket. Using progressively smaller end mills, mill the corners as close as you can to square. Then finish up with a broach or cold chisel.
A slightly easier alternative is to use "mouse ears" on the corners to avoid the need for long thin end mills and do everything under power. Using a drill slightly bigger in diameter than the smallest endmill you have that can reach the bottom, drill a hole just inside each corner that covers the actual sharp corner. Then drill and mill the pocket as above. The mouse ears give clearance on the corners to allow a perfectly sharp-cornered plug to fit in the pocket.
Sent from my Pixel XL using Tapatalk