So this is a really good question.
There are a couple of readings I can recommend for wider information and to illustrate where I'm going to draw my answer from.
Guy Pedroncini's 'Les mutineries de 1917' is the major book examining the events of 1917.
I also recommend:
Leonard Smith's chapter 'Remobilizing the citizen-soldier through the French army mutinies of 1917'
and David French's article: Watching the Allies: British Intelligence and the French mutinies in 1917
The main answer to the question 'How close to collapse was the French Army during the 1917 mutinies' is probably a qualified 'not very'.
This is mainly because of a difference in how the mutinies are viewed now versus the reality on the ground. French soldiers were certainly angry about the way they were being treated, their heavy losses etc, but they weren't actively leaving and going home. Nor were they trying to overthrow the army or anything like that. The 'mutiny' aspect is almost unhelpful in this sense.
Instead of a mutiny instead think of the events of 1917 as a worker's strike. Whilst some French soldeirs do abandon the trenches and start drinking heavily, and sharing various seditious pamphlets, the majority simply refuse to undertake offensive operations.
They don't want to lose the war, or have the Germans win. They just don't want to die for no reason or be treated in a manner that denies their citizenship as participants in the Republic.
So effectively they're on strike for better working conditions. They'll defend their lines if attacked but they won't go over the top.
Now that's still not ideal. The Germans never get wind of what's happening and if they had, they'd probably have attacked points where the confusions was strongest and that could've been a disaster for the French army.
The British are also largely kept in the dark. The French basically put the whole area into a form of quarantine so that nobody can get in or out and no word of events can spread.
What proves time-consuming, and is the focus of the aforementioned Smith article, is remobilisng these striking French soldiers into a position where they will attack again.
The French, through Petain, have to make various concessions: food has to be better, leave has to be more regular, there has to be a sense that men's republican identity is recognised and appreciated. These are citizen-soldiers who believe that they have rights.
But there is no imminent danger that they will all pack up and go home. They want France to treat them with respect. They don't want France to lose.
But the impact of 1917 has long-term effects on France and these soldiers that proves problematic. It makes them far less forgiving of allied failures, and breaks the 'union sacree' that had existed since 1914. In the long-term it makes many French soldiers far less accommodating of their government which weakens the Republic's ability to prepare for the Second World War.