If they were similar in numbers why would it be the Japanese ceding instead of the foreigners? Even if so, it's all the more reason to not let them in in the first place. Keep Japan Japanese for the Japanese
I don't think trade and diplomatic relations is enough. Most people are neither international traders nor diplomats. You need constant cultural exchange by a large sections of the populations for the cultures to drift towards each other.