Berlin authorities have cancelled contracts with a company that runs nine homes for asylum seekers after leaked emails showed the managers joking about executing young refugees.

The social affairs senator Mario Czaja severed ties on Sunday with Pewobe, whose hostels shelter about 3,000 people in the German capital, after Bild newspaper printed a series of emails apparently exchanged between three of the firm’s managers.

In one of the emails, Pewobe’s general manager appeared to suggest investing a €5,000 (£4,340) donation from BMW in “a small guillotine for children”.

In the ensuing messages, the company’s employees sent each other pictures of guillotines, beheadings, and a photoshopped image showing a playground slide ending in an oversized cheese grater. They also joked that disposing of the bodies would require a “large-volume crematorium”.

“The advantage is that we would get our environmental certificate back, because the waste heat could be recycled constructively,” one of them wrote.

Czaja, a member of Angela Merkel’s Christian Democratic party, said the “inexcusable” email exchange “makes it clear that any further work with Pewobe is impossible”.

The company’s lawyer said the leaked emails had been taken out of context, and that the term Kinderguillotine, or “guillotine for children” had been created by an autocorrect function. The firm said on Monday that it would appeal against the “politically motivated” dismissal, which comes almost a month ahead of local elections in Berlin.

The company has been under heavy criticism for some time. In July, a newspaper investigation revealed that its manager had in the past been a member of the DVU, a far-right nationalist party.

Berlin volunteering organisations have complained about “catastrophic conditions” in one of Pewobe’s hostels, with reports of leftover food attracting vermin and staff hindering volunteers from accessing its premises.