The Herald followed the case for more than a year before revealing the details.
The man was a manager within a government agency when the offending occurred.
He remains working for that agency but is now in a more senior role - a promotion that came after he disclosed his offending.
The current suppression orders prevent the Herald from publishing any further details about his occupation, role or workplace.
The case has been before the courts for more than two years and, after a number of delays including the national lockdown, was finally resolved last month.
Court documents provided to the Herald reveal that on November 23, 2017 the man placed a small USB spy camera in the changing room of a gym in the Auckland area.
The name and location of the gym are also permanently suppressed.
A secret camera and a secret court case
The police summary of facts revealed the camera was placed under the sink of a unisex changing room - viewing a bench area of the changing room.
Soon after, one of the victims discovered the camera and alerted the gym manager.
The camera was removed and police were called.
They found 39,360 still images and 12 video files on the camera, showing six victims in various states of undress or naked.
The man eventually pleaded guilty to a representative charge of intentionally making an intimate visual recording of another person.
A representative charge is used when police believe an offender has committed multiple offences of the same type in similar circumstances.
The man faced a maximum penalty of three years in jail.
But, despite police opposition, Judge Clare Bennett granted his application for a discharge without conviction, and his request for permanent name suppression when he appeared in the District Court last week.
"This is a case involving the surreptitious recording of intimate visual images," said Judge Bennett.
"Offending like this is serious."
But, she said the offending was "an isolated incident" and she was satisfied that "the direct and indirect consequences of a conviction would be out of all proportion to the gravity of the offence".
She accepted that if the man was convicted, he may lose his job and his and the government agency's reputation would be negatively impacted.
He would not be able to travel internationally, and there would be a significant impact on his family relationship.
Judge Bennett outlined the man's "extended career" in court - but the details cannot be published because of the suppression orders.
The man was supposed to be sentenced in March and, anticipating "potential publication" of his name, gave notice to his employer that he was going to step down from his role "to avoid any negative publicity being visited upon that organisation".
However instead of stepping down, the man was promoted to a more senior role shortly before lockdown.
"On day one of the Covid-19 level four lockdown, material was received by the court seeking a further order for name suppression, the basis of which was the maintenance of the integrity of [the government agency] given that you had stepped up to [the more senior role]."
Discharged, suppressed - how the sentencing played out
Judge Bennett said the man was of previous good character and had never appeared before the courts.
There was an "abundance of material" supporting his application.
She explained that the man's childhood was "marked with hardship and deprivation".
The court heard that the offending "may be seen as a response to his feelings of inadequacy which over time led to a regime of strict exercise and overindulgence in alcohol to deal with stress".
"It is submitted that [the man] began suffering from erectile dysfunction, which exacerbated his sense of inadequacy," said Judge Bennett.
"This drove his passing interest in pornography into an obsession reaching the point of occupying three to four hours a day.
"It is within this context that the alleged offending occurred."
The court heard that if the man lost his job he would not be able to pay his mortgage and be forced to sell his family home and move into rental accommodation.
"The sale of the family home would be a great stressor on the marriage and [he] is concerned it would be the breaking point in the relationship with his wife," said Judge Bennett.
Further, the man lived in "a small community" in Auckland and he was concerned that "news of a conviction would spread" and his family would "feel vulnerable to the public opinion".
"It is inevitable that there will be some negative consequences which will flow
from a conviction," said Judge Bennett.
She said the man was "extremely remorseful" and had taken significant steps towards rehabilitation, including 73 sessions with a psychotherapist.
The therapist told the court the man had made "positive changes" since the offending.
"He appears to have grown a lot in his ability to hold uncomfortable feelings and for over two years has not felt the need to escape through alcohol and pornography," Judge Bennett said.
The man had also completed 190 hours of volunteer work after Judge Bennett earlier indicated she would make an order of that nature as part of his sentence.
She said his actions after the offending had "tempered" and "mitigated" the seriousness of it.
The court heard from a solicitor who specialised in employment law who said that if the man was convicted, it was likely he would lose his job and he would "suffer reputational damage so that your career would be in tatters".
"There would be little chance of you challenging your dismissal, as doing so would be more harmful than beneficial," said Judge Bennett.
After assessing all of the material provided to the court by the police and defence, Judge Bennett granted the man's application.
"A conviction will likely have a considerable impact on your employment and on your family relationship," she said.
"I am satisfied in the circumstances that the consequences would be out of all proportion to the gravity of the offending.
"In exercising my discretion I have taken into account all the matters that I have been referred to … and the public interest.
"I discharge the defendant without conviction. I also make an order for costs in the sum of $500."
She also granted the application for permanent name suppression.
"Publication of a defendant's identity often occasions hardship. However, a very high level of hardship to the defendant needs to exist before the threshold of 'extreme hardship' can be established.
"It must be significantly greater than 'undue hardship'."
"Significant, or even devastating, economic consequences of publication for business interests associated with the defendant appear less likely to reach the threshold. In most cases, name suppression should not be viewed as a tool to protect commercial interests.
"In [this] case, I am satisfied that should his name be published he will suffer extreme hardship and his employer would likewise suffer extreme hardship from the publication of his name.
"Accordingly, I make an order suppressing the name."