B.x is zinc sheet, Y is NaCl solution, switch C is in position A, zinc is cathode, iron is anode, electrons on iron electrode are protected by reduction reaction, which slows down the corrosion of iron, so B is wrong;
C.x is carbon rod, Y is NaCl solution, switch C is placed in B, and the device is electrolytic cell. Electrons flow from the negative electrode to the iron sheet, and then from the carbon rod back to the positive electrode, so electrons do not enter the electrolyte solution, so C is wrong;
D.x is copper rod, Y is CuSO4 solution, and switch C is placed at B. The device is an electrolytic cell with iron as anode. The electrode reaction formula on the anode is: Fe-2e-=Fe2+, and the mass on the anode decreases, so D is correct;
So choose D.