This is a sophisticated question and I believe there is a direct connection between your two ideas. With the rise of expansion, we see also the growth of modernization. Whenever countries are isolationist, they tend to be less modern. But when countries open their borders and cross their own border into other nations, modernization rises. Part of the reason for his is due to human contact. In other words, there is free exchange of thoughts, ideas, and in time innovations take place. In short, there is strength and genius in many.
Part of the opening of countries has taken place by expansionism. Countries wanted to explore and to put it quite frankly expand. So, mostly Western powers went abroad. Certainly there have been many evils due to this, but one of the byproducts was modernization.