Russell Domingo conceded he will hand over an unfinished article to the person that succeeds him as South Africa's head coach, but hopes he has given them plenty to build on. Domingo, whose contract expired at the conclusion of the England tour, appears resigned that his reapplication has failed and considers his four-year tenure over. Though he leaves behind a team that will require some work, Domingo reflected proudly on what he achieved in this time at the helm.

"There are definite holes in the Test side that need bit a of attention, some tinkering which must take place," Domingo said. "But I've loved my time. For a team that has a lot of challenges we've done okay."

When Domingo took over from Gary Kirsten in mid-2013, he inherited a side that had already reached their peak. Under Graeme Smith, South Africa were No.1 on the Test rankings and though Kirsten exited with an ICC tournament defeat in the Champions Trophy, South Africa were thought to be building solidly to the 2015 World Cup.

Domingo's first assignment was a limited-overs tour to Sri Lanka which went badly, but his Test team drew in the UAE and won at home against India. Then came the retirements.

Jacques Kallis was the grinch who stole Christmas when he announced he would hang up his Test whites on that very day in 2013. The Boxing Day Test was his last. Three months later, with South Africa locked at 1-1 against Australia, Graeme Smith followed Kallis in the decider. The series was lost. A succession hunt bypassed AB de Villiers and found Hashim Amla, who led the team to victory in Sri Lanka and Zimbabwe, and against West Indies at home. Following a wash-out against Bangladesh, India inflicted a massive defeat on their new-look team at the end of 2015. By then, the World Cup had been lost, amid political interference in selection for the semi-final. Dale Steyn and Vernon Philander were injured and a home series against England awaited.

Things were tough and, when Amla gave up the Test captaincy, they got tougher. De Villiers accepted it amid anxiety over his workload and then got injured before he could bed into the role. Then came the transformation targets.

After a ministerial ban on hosting major tournaments, CSA introduced a strict system for the national team that required them to field a minimum average of six players of colour including two black Africans over the course of a season. Because the national side had resisted radical change for so long, such measures had to be forced on them.

The fuss that arose from this toxic mix of sport and politics - which is entirely necessary in a country like South Africa - made it seem as though all hope was lost. But when Faf du Plessis took over, South Africa enjoyed a summer of success in 2016-17 and redemption was in sight. Then came the Kolpaks.

Eight recently capped Test players chose county over country, including Kyle Abbott, who walked out on the team midway through their series win over Sri Lanka, and South Africa toured England with a depleted squad, and duly lost in an ICC event and a Test series. That is how Domingo will bow out.

"It's been tricky," is how he summed it up. "I took over a side that was established, then lost a lot of players, went through a dip, re-established some, lost a few players again, we sort of established something again, but then we lost Dale, Vernon and AB and that sets you back a little bit more."

In all of that, Domingo sees opportunity because, despite those three big challenges, South Africa continue to produce quality cricketers. He singled out two of them - Keshav Maharaj and Temba Bavuma - as future stars. Maharaj was South Africa's second-highest wicket-taker in the England series and has operated as their sole specialist spinner since November, while Bavuma, despite only one hundred to his name, has shown the temperament and technique to score big runs.

"I think Keshav is going to be the best spinner South Africa's ever had. He's fantastic, think of the roles he can fulfill. He's a fantastic young bowler," Domingo said. "And Temba Bavuma has shown so much promise. I honestly believe he's got the technique to become one of South Africa's best players, but you've got to persevere with him. You can't just, after 20 Tests, because he's averaging 30, get rid of him. You've got to invest in those types of players. You've got to give them time to develop."

And Domingo believes there will be many more even though that depth appears absent at the moment. "We will always produce good young cricketers because of our schooling system," Domingo said. "The challenge is keeping the players within the system. Look at the number of players playing abroad - you could pick a pretty strong side from the players playing abroad, That's the big challenge facing South African cricket - it's about providing opportunities for all those players to feature in our system, somehow."

One of Domingo's frustrations during his time in charge was the number of South Africans who played T20 leagues and then either picked up injuries or were fatigued by the time they were needed for national duty. De Villiers was a case in point. His elbow injury was at its worst after the CPL in 2016, which then ruled him out of most of the following season.

CSA have tried to prevent that from happening again with the introduction of their own franchised T20 tournaments, which will kick off this year. Although that means South African players will have wall-to-wall action from the end of September, when they host Bangladesh, until the beginning of April, when they play Australia, Domingo hopes the league will serve as an incentive to keep players in the country.

"We need to make sure that you have some sort of control of your players, so they are not playing in the Caribbean League week in and week out or trying to play in the Big Bash. They'll play in the IPL and they'll play in our domestic T20 league - that's sort of what you're hoping for," he said. "It also provides an opportunity to develop some new players, just look what the IPL has done for India, the number of young players that have come through because they are playing with some great players. It's a massive learning curve to play with the old experienced players - there are massive benefits for them."

As for Domingo, he could end up working with some of those players. While he has no firm plans on his future, he has been linked with the South Africa A side and the under-19 side and will try to continue to serve South African cricket. "I'd like to stay in South African cricket," he said. "I've got a young family, my roots are in South Africa, my family's in South Africa, I want to stay in South Africa. Whichever level I coach at, that's my job, that's what I love doing and as long as I can play some part in South African cricket I'll be glad to stay."

Firdose Moonda is ESPNcricinfo's South Africa correspondent