A family filmed being abruptly evicted from their home for Channel 5 series Can’t Pay? We’ll Take It Away has won a high court legal battle, which could force broadcasters to tone down the content of observational documentaries.

The episode of the show, which says it features “Britain’s favourite high court enforcement agents”, involved the filming of the eviction of a married couple for failing to pay rent.

Shakir Ali and Shahida Aslam, who have two children, were caught by surprise by the landlord and filmed by Channel 5 for the show.

The one-hour episode featured shots of Ali having just woken up, wearing pyjama bottoms and a vest, and shots of their bedroom and their children’s rooms and of family possessions stored in bags. It also showed the landlord’s son humiliating the couple, and revealed details including that the couple were unemployed and receiving housing benefit.

The show, which was watched 9.6m times on Channel 5 channels over an 18-month period, also resulted in the couple’s daughter being bullied at school, the court heard.

The couple engaged the law firm Hamlins to take Channel 5 to court, claiming they had a reasonable expectation of privacy.

Channel 5 defended the filming tactics as in the public interest as the show addressed real-life issues including personal debt and the dependence of tenants on benefits, and claimed viewing such scenes “was the best way to engage the public and stimulate debate”.

However, the production notes on the “story synopsis” showed capturing the drama of the scene was the main focus. It described the “eviction of a seemingly gentle tenant from hell and his very stroppy wife ... the main drama here is the confrontation between the landlord and the tenants”.

During the show, Paul Bohill, one of the eviction officers, tells the landlord to provoke the tenants and “say whatever you like, just give it some wellie”. He is heard twice saying that it made “good television”.

Mr Justice Arnold backed the couple, awarding them £20,000 and saying that Channel 5 went too far.

“The focus of the programme was not upon the matters of public interest, but upon the drama of the conflict,” he said in a ruling handed down on Thursday. “The programme did contribute to a debate of general interest, but I consider the inclusion of the claimants’ private information went beyond what was justified for that purpose.”

The ruling means that broadcasters will have to make sure they have a strong public interest argument for filming, or adopt a less intrusive approach.

“Channel 5 welcomes the judge’s assessment, which recognises that the programme is made in good faith and in the public interest,” said a spokesman for Channel 5. “We are encouraged by the judge’s acceptance that Channel 5’s editorial discretion extended to the presentation of the story, the tone of the programme and the material included, providing a fair and accurate account of the eviction of the claimants. We also note that the case’s final verdict was based on the specific facts related to a segment involving the Ali family and not the series in general.”

Last year, breaches in rules regarding secret filming for an episode of the BBC One series Britain on the Fiddle resulted in the collapse of the prosecution of an alleged fraudster who was accused of swindling £40,000 from councils.