Of all the reasons to replace a frame, getting a better fit would be one of the best. I'm 5'10" and I always rode an 18" frame in the 90s.
I can't tell you about the parts swapping out, but don't be surprised if a few things don't match, especially if the frames are different models. You might also find that the stem from the larger bike isn't the best length for the smaller one. The brake and shifter cables may need to be replaced, but that's a small expense.