The true art of politics is to extract the maximum benefit out of imperfect bargains. The successful politician takes even the most minimally advantageous position and gains something from it until he may, incrementally, derive the maximum available.

And because the dynamics of power are never static, the successful politician knows how to play the game of accumulation, rolling with the punches and swimming with the tide, all the while biding his time until he can accumulate enough power to reshape the environment to his advantage.

On this score, Matamela Cyril Ramaphosa is not doing badly for himself. He won the presidency of the ANC by a whisker only eight weeks ago. Since that narrow victory against a faction loyal to Jacob Zuma, he has used his still precarious position to achieve several goals calculated to consolidate his power leading to and after the 2019 general election.

He started a thorough clean up of Eskom, the state-owned company at the centre of the Zuma state capture project, got the president out of office with minimal fightback, consolidated his hold on the national executive committee and national working committee and has isolated the two remaining Zuma loyalists among the top six officials.

Then, in the drive to get the ruling party fighting fit for a difficult general election in 2019, this week he cleared the Cabinet of the core group of Gupta-appointed state capture ministers and restored credibility to key executive posts that will determine the success of the anti-corruption clean-up going into next year.

None of these moves have been easy or come without resistance, and the results are not yet perfect. But Ramaphosa’s drive is not for perfection, it is for incremental advantage. This week’s Cabinet reshuffle is a case in point. There has been much gnashing of teeth at the survival of some ministers from Zuma’s Cabinet, who are perceived to either be state capture actors or general disasters in their own right.

These objections are a bit uncharitable. Ramaphosa got rid of no less than 10 ministers and made changes to 21 ministerial posts out of 36. In addition, he appointed four new deputies and moved one. In all the key portfolios — the ones on which the party’s fortunes may hang in 2019 — he made the sort of tactically astute appointments that could very well tip a potentially delicate balance in favour of the ANC.

At the finance ministry, the return of Nhlanhla Nene from the fictional Brics Bank sojourn to which Zuma sent him some two years ago has been universally welcomed. The country’s first black African finance minister will now have the chance to complete his rudely interrupted 2014-2019 term of office.

Malusi Gigaba appears to have done no visible damage during his short stint as finance minister and, in the latter months — especially since Nasrec, funnily enough — made all the right noises and moves to right the wrongs at the state-owned enterprises (SOEs). But because of the manner of his elevation to the job, his continuation in the post was never going to be palatable.

Ramaphosa was given a timely reminder of Gigaba’s credibility gap during the latter’s only budget speech, which was boycotted by the Economic Freedom Fighters and briefly interrupted at the beginning by the Democratic Alliance. The department has been destabilised and lost many high ranking (and highly regarded) professionals since Nene’s sacking in 2015, so he and his new deputy Mondli Gungubele — himself widely considered among the best in the ANC’s 249-strong caucus — will have their rebuilding work cut out for them.

Gigaba may not have done much damage at the treasury but that is in part because he shot most of his nefarious load at the departments of public enterprises and home affairs. In both portfolios he did his best to enable the Gupta’s near wholesale takeover of the state, either by packing SOE boards with Gupta cronies or waving them through pesky naturalisation processes. This week he returned to the latter crime scene, where senior officials may have cause to wonder what they ever did to deserve getting him twice.

Pravin Gordhan now has the unenviable task of scooping up the poo at the public enterprises department left by Gigaba and his even worse successor Lynne Brown. There was some clamour for Gordhan to return to cabinet as finance minister again, but I would not be surprised if he rejected this and chose public enterprises himself. As a member of that portfolio committee he revelled in holding the boards and management of SOEs to account and must have been itching to get stuck into them as the person in charge of the oversight department.

If Eskom is South Africa’s most important SOE, then the state’s two main transport companies are a close second. Transnet is the backbone of freight rail, which is meant to keep bulk and consumer goods moving, and is the main custodian of the national rail infrastructure. The Passenger Rail Agency of South Africa (Prasa) is meant to be — but sadly is not — the dominant mode of long distance and urban commuter transport for millions.

Prasa, beset with board and management instability as well as operational and financial underperformance, will now be overseen by Blade Nzimande, the new minister of transport.

Nzimande is another returnee shafted by Zuma in his last Cabinet reshuffle, as the state capture project grew more desperate and brazen. He was treated particularly badly by Zuma, who spent months throwing him under the free higher education bus by side-lining him from the raging debate. Nzimande was otherwise an effective minister who worked tirelessly to establish two new universities. He will get the transport ministry right, if only because he’ll spend his time doing his job rather than gerrymandering SOE boards to pack them with cronies.

Ramaphosa appointed Naledi Pandor as higher education minister, a move that immediately lends gravitas and depth to the free higher education debate. Pandor has a reputation for integrity and administrative effectiveness. She is passionate about research and innovation, and her enthusiasm elevated the science and technology portfolio even as she served a president who couldn’t care less for it.

In the key economic portfolios, Ramaphosa’s biggest gambles were the appointments he made at the departments of energy and mineral resources, where he chose Jeff Radebe and Gwede Mantashe respectively. Radebe’s job will be to put South Africa’s integrated resource plan back on track after the scandalous and corrupt flirtation with nuclear energy. He is clean and trustworthy enough to be entrusted with that. Remarkably, in nearly 25 years in the national executive, he has never been implicated in any dodgy business — the odd C.L.I.T request aside. Radebe is the second oldest minister in Ramaphosa’s Cabinet, and it’s unlikely he has a future there beyond 2019.

Mantashe knows the mining industry like the back of his hand but does have a reputation for brashness. It’s a sector where confidence and co-operation are at an all-time low, not least because of the risible tenure of Mosebenzi Zwane, the corrupt Gupta stooge Zuma foisted on the industry. Both mining companies and unions could have done with a sweet-talking conciliator who has Mantashe’s knowledge and experience. It does not help that Mantashe has worked within the state.

For the purposes of 2019, those are probably the key appointments. But the president has faced unhappiness over the retention in Cabinet of Gigaba, Nomvula Mokonyane (who was moved from the water and sanitation department to communications), and Bathabile Dlamini (from social development department to the presidency). But these retentions have much to do with the politics of incremental accumulation. Ramaphosa did not sweep the Zuma cabal aside at Nasrec. He is has them in the top six, so it is unsurprising that he must live with them in his Cabinet.

The president’s true moment of reckoning will come in 2019. That is how David Mabuza’s appointment as deputy president should be seen. Ramaphosa could have overlooked Mabuza and was probably tempted to do so.

But Ramaphosa cannot spend the next few months looking at his shoulder at his deputy or staring down the remnants of the Zuma project. His job now is to win the general election and do so in such a way that the ANC is grateful and indebted to him for its continued hold on power. Only then will he be able to fully dictate terms. For now, he has chosen a Cabinet to help him do that. He is not doing badly.

Vukani Mde is a founder and partner at LEFTHOOK, a Johannesburg-based research and strategy consultancy