Version history is only interesting if you’re doing archeology. And I would prefer seeing a squashed commit that introduce a complete change instead of going back and forth to get the complete picture (anyone with such messy history will introduce unrelated changes too).
As for failure, put that in some tracker, with an “abandoned” status.
Sure, that makes sense, if you’re just interested in the internals, the history doesn’t matter. I get that.
But what do you think about the idea of keeping two views of history? One that’s clean and human-readable, and another that preserves all the detailed commits. With the right filters, you could switch between the simple view and the full story.
EDIT: By the way, I just want to discuss a theory/some thoughts here. There are always pros and cons, and perhaps my text is a little too harshly worded.
One thing about code archeology is that you’re not really interested in the diff itself, but the commit description. Which is why an issue tracker can fit that role.