Who makes that decision? Cocoa slavery is a thing because the economics of raw material pricing is complicated by many factors but the demand is very simple and very high.
I'd expect the price for beans as-delivered to Switzerland is likely to go up. The price for beans as-offered in Ghana is likely to go down. The latter matters more to Ghana cocoa farmers.
Depending on how big the export is in relation to your economy, it can certainly have a negative effect: https://en.wikipedia.org/wiki/Dutch_disease
That seems to be what happened with Mars and Hershey (i.e. a price increase) though put in the terms of not paying farmers enough and trade war. It's unclear to me whether Mars and Hershey are now getting less cocoa than they did because cocoa is being diverted to domestic production, or the same amount and paying more.
If you think you're not being paid enough, increase the price along with creating your own products. It seems weird to me to not let foreign countries buy your raw materials just because you want to produce more stuff yourself.
It's not like I will start buying chocolate made in ghana because they don't want to sell their cocoa anymore. I will still buy from the brands I like and are used to most of the times, which is a local brand.