African economies are growing rapidly and as a result they are getting a lot smarter about how they use their resources. Also, there are a lot of African entrepreneurs getting into farming.
I suspect they can, Africa is urbanising quite quickly at the moment. I'm sure you will see improvements in food production.
The real question is will climate change overwhelm any gains they make.
The countries they would buy food from are probably in a much better position to mitigate the harmful effects of industrialized farming. The question is whether this can be done at a price point that is affordable for Africa.
However, they have a lot of existing customers in Europe and Asia who appear to have better prospects for generating foreign exchange to buy food than does Africa. Africa generates foreign exchange mainly by selling raw materials, such as metals, petroleum, etc. Labor, per se, appears to have declining value as population increases and as AI automates more and more work. The incremental value of another billion workers is very low.
Climate change is going to wreck food supply chains across the globe, since the current food production and distribution has much less excess capacity than it did before.