The Department of Work and Pensions is refusing to publish the names of charities and businesses where tens of thousands of unemployed people are being made to work without pay for four weeks at a time.

In a battle with the information commissioner, the DWP has said that the government's mandatory work programme would "collapse" if the names were made public due to the likelihood of protests against the organisations involved.

In August the commissioner ruled that the names should be released. However, in a 14-page appeal document leaked to the Guardian, DWP lawyers have argued that the details of companies and charities involved in the mandatory work activity scheme – which compels unemployed people to do 30 hours of unpaid labour a week in order to retain their jobseeker's allowance – must remain secret.

The Guardian has also learned that the British Heart Foundation – one of the largest charities already known to be associated with the mandatory work activity scheme (MWA) – is to drop out of the programme, moving instead toward a more long-term voluntary scheme.

During the nine month secrecy battle – directly sanctioned by employment minister at the time, Chris Grayling – the DWP has fought hard against releasing the full list of names of organisations involved.

Government lawyers say the entire scheme would have come unhinged had they released placement details at the time of the request because campaign groups would have focused their protests and forced the charities and businesses involved to withdraw.

"Previous targeted campaigns had resulted in the withdrawal of providers from MWA and WE [work experience]," the leaked document reveals. "The DWP considered that, of all the workfare programmes being described externally as 'workfare schemes', the MWA programme was the most likely to be influenced by pressure from campaign groups and negative publicity, given that MWA programmes were generally provided by charitable organisations … and the placements were mandatory," lawyers said.

"Put simply, disclosure [of names] would have been likely to have led to the collapse of the MWA scheme, with incalculable losses to the taxpayer and many thousands of persons in long-term unemployment who are supported by the scheme," the appeal states.

Since its introduction in May 2011, mandatory work activity has been the subject of fierce criticism from campaigners who say that it represents a form of 'forced labour' or workfare.

The government's own research also showed that the scheme does not help the unemployed to get a job once they've finished the four weeks of work. It also had no effect on getting people off benefits in the long term.

Following a change in the rules a fortnight ago, unemployed people who refuse to take the unpaid placements can have their jobseeker's allowance stripped from them for up to three years. The appeal, filed on 27 September, also reveals that those involved in MWA "tend to be charitable organisations". Previously the DWP has given assurances that only organisations who provide 'social benefit' could take part in MWA. Campaigners say it is of paramount public interest to know how many profit-making businesses are involved in using labour from forced work schemes.

Using a freedom of information request, the Guardian was able to discover that unpaid jobseekers were being used by businesses to clean private homes.

In a statement about their withdrawal from the MWA scheme, the British Heart Foundation's retail director, Mike Taylor, said: "We rely on our fantastic BHF volunteers to help us fight heart disease and are very proud of the training, skills and experience we can offer people working in our shops. Last year alone we helped over 600 staff and volunteers gain vocational qualifications.

"We are always striving to improve the ways in which we recruit and retain volunteers. Currently we are moving away from involvement in the mandatory work activity programme towards schemes which provide longer term voluntary placements."

BHF said it was now working with Jobcentre Plus to "actively promote volunteering as an option for people from all walks of life who find themselves unemployed."

Campaign group Boycott Workfare, welcomed BHF's move. "It is good to see a charity that was using workfare on a massive scale acknowledge that forced unpaid work isn't palatable for their supporters or customers."

"For workfare to succeed, the government needs charities to co-operate. We hope BHF's retreat marks a new line in the sand: charities should not be making people poorer by putting them at risk of benefit stoppages. They have an ethical obligation not to profit from forced unpaid work."

Commenting on the FoI battle, Joanna Long from Boycott Workfare said: "That the government fears MWA would collapse if it publishes who is using workfare reveals how unsuccessful and unpopular with the public these schemes are.

"With people now compelled to work without pay on threat of three-year benefit stoppages, alongside a scarcity of jobs and overtime this Christmas, it is really important that information about the schemes is published so they can be held to account."

The DWP said it would not comment "on ongoing litigation". However, speaking about the BHF's move, a spokesperson said: "Mandatory work activity placements benefit local communities while giving jobseekers valuable skills. We are grateful for the support of the charitable sector in helping unemployed people re-engage with the system and move closer to work.

"British Heart Foundation has assured us their decision to move away from mandatory work activity has not been influenced by any protests and they are working with Jobcentre Plus to promote longer-term volunteering."