What a good idea. It would need some careful consideration, so not to break the current trading system.
If I understand the current trade system correctly, resources given up for export is a very loose simulation of the entire world trade system. All those resources not getting visibly bought by another nation, are not really rotting or accumulating in warehouses. They are traded into the invisible trading world that HOI4 is not willing to commit development resources to simulate. Every day, those 'unbought' resources disappear for ever as though world commerce had consumed it all. The few nations that do visible trade with us and give us CIVs is for game play purposes only. If a nation got CIVs for all the resources it sold, then exporting nations would be rich and could very well break the game.
Still, in my opinion, I believe there may be room for your idea as long as we are careful not to break the game. For one, the current trade system most likely simulates the intersection of a nation's economic law and the world trade system. A nation puts up resources for sale to the world market at the rate of 1 CIV per 8 resources (usually) because that is the highest price it can get for the resources. For a nation to purchase its own resources, and in effect, pulling it out of the world trade system would require a higher price. The price would need some serious balance considerations. For two reasons, the price would most likely have to be expensive. One, obviously, is to prevent the player from simply buying only from themselves, instead of AI nations. Two, a nation's current economic law is simulating (or should be) that it is more profitable for those resources to leave the country. Keeping any of those resources in the country would require paying more. What is more? Enough to make it a last choice. Maybe a price of 1 CIV for 4 to 6 resources would work, but it would have to be expensive enough that trade between nations does not shut down.
Some may say that is to expensive. I would reply, no, the expense was created by choosing an economic law that makes internal resources expensive. To reduce the expense, then reduce the economic law. Economics does not allow both to happen, such as making resources expensive enough to sell abroad, but at the same time cheap to purchase internally. The resource can only be expensive or cheap. Not both.