I would expect current progress in AI to deliver the equivalent of a veritable army of consultants for very cheap, available to basically everyone within a decade or so. But that is not gonna make foreign labor worthless (or labor in general-- maybe a lot of whitecollar/creative work, we'll see). But trade is always gonna have value until the earth is perfectly homogenous, simply because it allows you to get value from both being better at things than other nations (=> export) AND from being worse (=> import).
If you are gonna go full autarky, you are going to be left behind by countries that don't, because all the spread-out efforts will struggle to compete with nations that put actual focus on things, and in-housing everything will drive up costs and prices tremendously.