The problem with cover letters is false positive (people who did not write the letter themselves, or who did it to a much higher standard than their usual). But then, that’s what interviews are for.
I did hire a couple of people with either a subpar CV (some good people sometimes end up in dead ends or difficult situations), or cover letter (not everyone is a great writer), or reference (your issues with your former boss are not always your fault), or interview (you can have a bad day), so I would not rely on a single factor. But a combination of 2 dodgy elements is an automatic rejection. Each one tends to surface different aspects.