There are few projects a lifelong eurosceptic could treasure more than managing Britain's withdrawal from the EU. David Davis was given the most coveted role in the history of his ideology and he flunked it, at every stage, with a series of unforced errors based on his own ignorance of the thing he ostensibly cared about.

It started in the campaign, when he wrote that the first port of call for a British prime minister after Brexit would be Berlin, not Brussels, to do a "UK-German deal" involving "free access for their cars and industrial goods, in exchange for a deal on everything else".

The first calling point of the UK's negotiator immediately after #Brexit will not be Brussels, it will be Berlin, to strike a deal — David Davis (@DavidDavisMP) May 26, 2016

How ludicrous and bitterly ironic that statement looks now. He was unaware that bilateral trade deals are impossible for EU member states and grossly overestimated, as many Leavers did, the extent to which the profits of the German automobile industry would influence the approach of Europe.

The reality was precisely the opposite. By November, Matthias Wissmann, president of the German Automotive Association, was warning that prolonged uncertainty could stop investment in the 100 German-owned car production sites in the UK. Instead, it is the UK car industry which is lobbying the British government for a soft Brexit, to protect their supply chains against the trade blockages which Davis did not even know existed, and still refuses to recognise now.

By the time he started as Brexit secretary, it was not even clear that Davis understood that the Republic of Ireland was a separate country. "One of our really challenging issues will be the internal border we have with southern Ireland," he told Sky's Murnaghan programme in July 2016. This seemed so staggeringly ignorant that it could not possibly be accurate. Viewers maybe presumed he'd misspoken. But then he went on: "We are not going to go about creating other internal borders inside the United Kingdom".

In the first few months of the job, Davis insisted the UK could leave the single market and customs union, but that economically nothing would change. "What we have come up with," he told the Commons, as if he had just figured the whole thing out, "is the idea of a comprehensive free trade agreement and a comprehensive customs agreement that will deliver the exact same benefits as we have".

This was later seized on by Labour as its test of the Brexit government's accomplishments, and why not? It was the promise Davis had made. His errors were so consistent and severe the opposition had started copying and pasting his own Commons statements as an attack.

Once talks started, Davis' complete lack of research or understanding was immediately apparent. One of the most striking images of the Brexit process was that of him sat down for an opening meeting in Brussels with no notes or documents at all. At the table across from him is Michel Barnier and his team, with thick wads of papers, looking unimpressed. Sabine Weyand, who would later go on to destroy the May government's customs plans, looks particularly irritated.

Michel Barnier sits down with David Davis with huge wodge of notes. Davis - with nothing - https://t.co/1eLT5nXRfU pic.twitter.com/3AVIrXSkyX — AndrewSparrow (@AndrewSparrow) July 17, 2017

The image became ubiquitous - a symbol of general British lack of preparedness. But even now, it deserves close inspection. It tells you all that you need to know about Davis, and indeed about a deeper British problem of valuing have-a-go male arrogance over technical expertise and research.

Look particularly at his laugh, that false-bonhomie mirth he brings to every encounter to smooth over the cracks. There is nothing behind the smile. There is ultimately no real jocularity. It's the empty laugh of a clown - it is there to create an impression, not because he found something funny. That's why these images of Davis in summits look so jarring. Very often he is the only person laughing in them. Quite often it is because he is laughing at what he has said.

In the end, even the laugh is fake.

Once the talks started, Davis' failures went from the embarrassing to the structural. He was no longer just making a fool of the British reputation. He was now in charge of talks which would decide the core functioning principles of the economy for a generation. He began to age very quickly. The laugh was gone, replaced by drooping eyebrows and a sagging ashen face.

The mistakes came thick and fast. He promised that a disagreement over the sequencing of talks would be the "row of the summer", before capitulating to the EU in minutes. He looked terrible on the podium doing joint press conferences next to Barnier. The Commission negotiator looked far better briefed, composed, well dressed and in control. He even told better jokes. It was like the dynamic between David Brent and his boss Neil in The Office.

By December, his strategic ineptitude had proved so severe that the Irish backstop was signed off by the British government. It has dominated the Brexit debate ever since. It was clear at the time how important this passage was, but Davis did not seem to have understood it. When he did, in the days after the document was agreed, he tried desperately to reverse-course, saying it was just a "statement of intent". The EU then had to draft it in legal text, basically codifying the backstop agreement, to make it "David-Davis-proof".

Eventually Davis was frozen out of talks altogether, in favour of Olly Robbins, who shifted from DExEU to Downing Street. Last month it emerged Davis had spent just four hours with Barnier so far this year.

Even at the end, he was pursuing strategies which were sure to fail and went against all evidence of how to approach this issue. "It’s a choice about strategy," a Brexiter - probably Davis - told the Sun before the Chequers meeting, as it reported his anxieties around the new government plan. "Do you be extremely reasonable and adjust, or do you face down the EU? They will come to us eventually, we just need to hold our nerve."

This is exactly the case he was making on the Today programme this morning as he dismissed an October deadline for the end of talks and said they could go down to the "last minute".

This is his great and final mistake, his one last piece of ignorant over-confidence. It is also the one which could still drive us over the cliff edge. The EU are not bluffing. A chaotic British exit is to be avoided, but it is not as bad as carving up the single market - the very engine of the European project. Davis has not understood this. Nor has he understood, even after all this time, that Britain's lack of customs and regulatory infrastructure puts it in a weaker position than the EU when it comes to no-deal. He is a man on a bicycle playing chicken with a lorry.

The irony is that Davis has probably made a smart career move today. He finds a new role for himself. He is no longer a bumbling incompetent gradually being cut off from negotiations. He is the lightning rod for Brexiter discord on the backbenches, where they can live out their permanent fantasies about how they would have done things so much better without ever having to actually explain how they might do so.

But with Davis it is demonstrably false. He was in charge and he messed it up, from start to finish. After all those complaints about the EU, he did not understand even very basic things about it. After all that arrogance and swagger, there was no intellectual force to back it up. He failed completely.

Ian Dunt is editor of Politics.co.uk and the author of Brexit: What The Hell Happens Now?

The opinions in politics.co.uk's Comment and Analysis section are those of the author and are no reflection of the views of the website or its owners.