You cite length of borders as an issue. Borders grow as the square root of the size of a country, and if we assume that population & resources grow linearly with the area of a country, securing borders is actually easier for big countries.
The cost of having a strong enough security forces and of building adequate transport infrastructure should not depend on the size of the countries, but on the population density -- when expressed as percentage of GDP.
Africa's population density is not exceptional in any way: Africa: 30 person per km^2 (and this includes the Sahara where basically nobody lives -- almost a third of Africa) South America: 21 USA: 31 Mexico: 55