I think the outcome was inevitable given everything that had preceeded it. The mistake the UK government made was right at the start of the process when it put reaching an agreement with the EU at the heart of its plans, and the EU gleefully accepted this gift - it responded by taking the position that nothing was agreed until everything was agreed, which was basically an impossible proposition.
I thought from the outset that we should have taken the opposite tack - i.e. gone with the working assumption that there wouldn't be a deal, outlined exactly what that would mean for all parties, and spent the intervening time planning for that. In essence, to prepare for a 'hard' Brexit, whilst working to reach agreements on specific issues to mitigate its effects. As a negotiating position, that would have given us significantly more leverage, and would probably have resulted in a more sensible process where both sides sought to make progress on the issues where they could reach agreement, understanding that there would still be areas which would need to be resolved long after Brexit had happened.
Oddly enough, that kind of approach is still one of the possible outcomes, albeit with a lot of time that could have been spent preparing for it having been wasted (and the sense that it will have happened by accident as the UK lost control of the negotiations).
Regarding the Irish border question, could the UK not simply have taken the position from the outset that this was a bilateral issue between the UK and Irish governments? Surely a hard border only exists if the nations on either side of it put the infrastructure in place to make it a reality. I did see somewhere an explanation of why this might not have been a realistic option for the UK, but I've forgotten what the reasoning was (it wasn't anything to do with EU rules or the single market).