Let people move without barriers. Countries will have to compete basing on happiness not production. Happiness will equalize. The only problem - population density is part of happines, so borders should be adjusted for population.
Easiest way to do both automaticaly is to let people declare which country their immediate neighborhood belongs to.