He was essentially considered a failure, according to his critic P.S. Aiyar, editor of a weekly paper called African Chronicle aimed at Tamil readers, in which he writes that Gandhi's non-violent struggle had “resulted in no tangible good to anyone ," and that he and his associates were looked upon as “an object of ridicule and hatred among all sections of the community in South Africa .”
Gandhi's luck was about to change that made him immortal.
The difference between Gandhi being known for say one or two generations (at most) and immortality came down to one event that pretty much fell into his lap in 1913. He did not start it, but seized the moment and led it and that experience gave him a deep insight, confidence and credibility that no other Indian leaders in India had to start a political movement of scale when Gandhi returned to India to wage the non-violent struggle against the British Empire.
Gandhi's luck as a political leader changed when poor Indian indentured laborers went on strike in 1913 in a coal-mining town of Newcastle in Northern Natal in South Africa.. Gandhi had not paid much attention to the plight of these oppressed workers who were derogatorily referred to as "coolies." They were supposed to be protected by a colonial officer with a feel-good title of "Protector of the Immigrants," but was really looking after the interests of the plantation, mine and railroad owners. The workers had enough and finally walked off their jobs in thousands to follow Gandhi's non-violent resistance,
Another thing that Gandhi had not figured out was how to integrate people of low caste Indians into his non-violent movement of which many of these indentured belonged to. Many had come to South Africa not only to earn money but also hoping to launder their low caste when they returned to India. Since Gandhi was liberated from the shackles of the caste system that when urged by his followers to lead the labor strike, he did not waver and changed the game both for himself and history.
This is where tactics finally met a cause at scale in a way Gandhi had never envisioned it since he felt these workers would not be his constituency who would embrace his tactics since they were ignorant and prone to violence. When he saw what was possible, it made him realize that it was the poor that he had to mobilize and this insight no other Indian leaders had. After the strike, Gandhi realized what was possible and became the leader of the non-violent mass movement against the British that led to India gaining its independence.
Gandhi had to pivot in order to turn his "lean startup" into a non-violent mass movement.
What Gandhi learned from his experience with indentured servants is how to connect with the poor. Any movement needs foot soldiers and the numbers would have to come from the 700,000 villages in India (prior to partition). The Anglicized elites (mostly lawyers) in India had passion and ideas but lacked wide support from people that really mattered.
Joseph Lelyved writes in his book that Gandhi might have "faded into semi-oblivion if he’d returned to India in 1912. His final ten months in South Africa, though, transformed his sense of what was possible for him and those he led ." The two important things Gandhi gained from the labor strike in Natal and his stay in South Africa was that satyagraha (passive resistance) "as a means of active struggle to achieve a national goal belonged to the first category; satyagraha involving the poorest of the poor fit the second. These were what he carried in his otherwise meager baggage when, finally, he came out of Africa ."
Gandhi arrived in India with a valuable insight that helped him frame a simple question when he became the leader of the independence movement that resonated with the masses: How can a country of 300 million people be ruled by 100,000 Britishers if the people refuse to cooperate? British rulers realized that you can't and eventually quit India in 1947.
Startups of all kinds at some point are faced with a hard decision to either perservere or pivot, and sometimes a small pivot is all that's needed that can make a difference between failure and success. This is true in business, life, politics, and even mass movement.
 Lelyveld, Joseph, "Great Soul: Mahatma Gandhi and His Struggle with India," Vintage, March 29, 2011