I agree it's likely not cost effective, but it does seem doable. If hub manufacturers were THAT concerned with the lightest possible hub, they would not use standard sizing, and you'd have to buy proprietary freewheels for every brand. I don't think the couple mm difference between freewheel diameter, and lock ring diameter would usually not have much effect on overall durability of a hub.
I don't have any particular desire to try this, but I do think it would be a relatively straight forward job for a competent machinist, and probably would not cost all that much.
Still cost-wise, it probably would not be worthwhile for an inexpensive hub, and would likely be a travesty to perform this operation on a high end hub.