A stagnant economy and widespread corruption allegations have put the African National Congress on the defensive ahead of local elections this week, which could push the party that has ruled since apartheid’s end out of power in South Africa’s most important cities.