Martyn Russell William Darlington, 39, was said to have been lonely while working away and started to watch pornographic material on the internet.
It developed to watching and saving indecent child images and he ended up with a collection of more than 25,000.
Police who examined his computers also found 38 films in which he had recorded a teenage girl without her knowing while undressing, getting in a bath naked and while using a toilet.
Judge Rhys Rowlands, sitting at Mold Crown Court yesterday, jailed him for eight months after he admitted three charges of voyeurism dating back to 2013 – with a consecutive six month sentence for 14 offences of possessing indecent still and movie images of children.
He was ordered to register as a sex offender for a decade and he was made the subject of a 10-year Sexual Offences Prevention Order (SOPA) to curb his future use of the internet and his contact with youngsters.
The judge said he had to take account the “quite unacceptable” delay in the case because Darlington had been arrested and admitted what he had done in October, 2013, but it had taken a long time to get to court.
He had filmed a teenage girl for his own sexual gratification.Then police were called after indecent images which he had downloaded off the internet had been found on his computers.
Judge Rowlands said that it had been “a pretty vast collection” of images of some very young children.
“On any view, this was quite depraved behaviour on your part,” the judge said.
It was aggravated by the fact that the victims in some of the sexual abuse images from the internet were very young and some were “particularly bad”.
Darlington, of Penymaes, Mynydd Isa near Mold, was found to have 25,000 indecent still images and 359 indecent movies – and 38 movies which involved the voyeurism recordings.
Karl Scholz, prosecuting, said 38 films were found which related to a teenage girl he had recorded using covert cameras.
Darlington’s partner became concerned at the amount of time he appeared to spend alone behind his computer screen and when he was out, she got friends around to help her see what he had stored in various files and folders.
The indecent images downloaded from the internet were found, the police were called and he was arrested.
He admitted downloading images from the internet for some four years.
In addition to the 25,175 indecent images of children found, there were a further 74,000 images which were considered too prohibitive to categorise.
Mr Scholz said a further 105,000 images were found which involved scantily clad young girls in bikinis and underwear but which were not subject to criminal charges.
There were also 365 videos and the prosecutor said that 183 stills and 82 films were at the worst category A.
Guy Dodd, defending, said his client was a man of no previous convictions of exemplary character who had worked throughout his life.
He was a land surveyor and railway construction engineer who had worked away a lot during the week and at weekends.
“My client does not wish to make excuses,” he said, but by the nature of his employment he felt very lonely and isolated, had little or no sex life, he started to look at adult porn and stumbled across a site which featured child porn.
He realised he should have stopped at that stage but stupidly began to look at the images on a fairly regular basis.
“He did not initially think he was doing anything seriously wrong.”
Mr Dodd said his client had not bought cameras specifically for the voyeurism offences but already had them to fit on to remote control cars.