A highly sophisticated machine gun manufacturing operation has been dismantled after a former cop was busted with a cache of firearms and ammo, police say.