While planning to invest in Africa, some aspects like Inflation, doing business facilities, government priorities, governance, legislation, corruption, transparency if public purchase, security, GDP per capita,etc. should be considered.
Conduct the genuine Feasibility studies in the area where you want to invest in Africa. Keep in mind to measure the others issues like electric power, water availability including the parameters of population, skilled labour force, marketing and transportation etc have to be considered at the beginning will hold good. Sustainability is more important that Feasibility studies will bring the clear picture.
As others have indicated, political stability is a major consideration. Please check this out: https://www.cnbcafrica.com/news/financial/2020/02/19/experts-share-their-best-advice-for-making-your-first-investment/