Microscopic work distribution of small systems in quantum isothermal processes and the minimal work principle