The transport secretary, Chris Grayling, is an “international embarrassment” who should be sacked without delay, Labour said after it emerged the government must pay £33m to Eurotunnel over the Brexit ferry fiasco whether or not Theresa May seals a Brussels deal.

Informed sources say the out-of-court settlement made on Friday involves a straight payout to the Channel tunnel train operator despite suggestions by the government to the contrary after an urgent Commons question.

In a further chaotic development, the health secretary, Matt Hancock, faced ridicule when he was sent to replace Grayling to answer the question on Monday evening.

Eurotunnel had taken the government to court over contracts with three ferry companies, one of which had no ships, to transport vital medical supplies from the EU in the event of no deal.

Hancock appeared to come unstuck when asked by the Scottish National party MP Joanna Cherry how much of the £33m would be paid out if there was a deal and the extra ferry capacity was not needed. He suggested it would not be paid over in full unless it was spent on “security” and “resilience” at Eurotunnel’s Folkestone terminal.

The “truth is the £33m is the maximum figure” that could be paid out, he said, adding: “It may not be as high as that but we’ve been clear about the maximum exposure.”

However, sources said the £33m was a conventional out-of-court settlement and was the price of dropping Eurotunnel’s case and would be “paid out, deal or no deal”. The figure was modelled on the loss of business the company would have suffered from freight being diverted to the ferry companies.

Much of Hancock’s time was spent batting away questions about Grayling’s absence.

The shadow transport secretary, Andy McDonald, said: “Once again the transport secretary is not in his place to answer a question directed at him. His disregard for taxpayers in this House is clear.

“Even in this golden age of ministerial incompetence, the transport secretary stands out from the crowd. He leaves a trail of destruction in his wake, causing chaos and wasting billions of pounds yet he shows no contrition, no acknowledgement of his mistakes nor any resolve to learn and improve.

“He’s now ridiculed in the New York Times; the mayor of Calais has banned him from his town. The transport secretary has become an international embarrassment.”

SNP MP Alan Brown tweeted: “FailingGrayling in hiding again. Meanwhile health secretary tries to argue the £33m Eurotunnel settlement is a ‘contract for vital services’. Bluff, bluster and incompetence being taken to new levels.”

When asked how much of the £33m was coming from the Department of Health, Hancock responded that, in the end, it was “all taxpayers’ money”.

“The point of this settlement is to ensure we have the medicines in no deal. If the court case had gone against the government, and the court had struck down those contracts, then we wouldn’t have been able to guarantee supply of those medicines,” Hancock said.

MPs also heard from tax officials on Monday that HM Revenue and Customs is nearly 1,000 employees short of the numbers needed to cope with a no-deal Brexit. They told the public accounts committee there was not enough time to offer advice to cross-border traders on how to work within any new rules if the UK left without a deal.

Sir Jon Thompson, the chief executive, told the public accounts committee that HMRC would require 5,500 staff if Britain left the EU without an agreement with Brussels. He said the department had employed just over 4,500.

Jim Harra, Thompson’s deputy, told the committee that HMRC could not give advice to businesses in Northern Ireland because a policy for the border in case of a no-deal scenario had not yet been produced. “My main worry for day one is there is insufficient time for traders who wish to comply … even if we announced tomorrow what our processes are,” he said.