I don't think there is any way of avoiding tax on gains. It is considered in GDP and a transaction hence must be taxed. One way or the other, more or less.
1, if you move to the house for 2-5 years, how about your old house lossing the homestead? You can't live in two places at the same time. Or I've missed something?
2, the 1031 like-kind doesn't require any homestead change, correct?
3, like the 401K, your gain is deferred to when you finally sell your last house or death, I guess.
4, like the wash sell, you will finally close the gain or loss on your last transaction.
Of course if I know all the answer I am earning that much.