If you consider that a core objective, besides just weeding out criminals, his moves weren't "middle schooler mistakes". It is explicitly addressed in both the show and the manga that he intentionally creates patterns and responds directly to provocations to make L and the detectives aware that he is amongst them and is challenging them. Whether that's a merit-worthy core objective or not is questionable, but to him the whole Death Note would have been meaningless without the ability to parade as a God, and that's what made the plot interesting.
First, obviously, that L is at least as good as Light; you can't scale up one side and not the other or you don't have a story.
And second, that Light fundamentally wants to be perceived as a real force, since he's nominally trying to deter crime. Sure, if he acted slowly and randomly, he could appear nearly indistinguishable from random chance, but he wants to send a message. That stipulation is enough to force him to reveal some information, and combined with a sufficiently good L, you'd still have a story.
The fact of the matter remained: when Light wanted to "hide" a death from the Police, he'd use a different method. (Episode 5: Kill by Traffic Accident).
The fact of the matter is, if Ray Penbar's wife actually got the information out to L, then Light would have lost right there and then. He was forced to kill her as soon as she was discovered.
If anything, his mistake was killing the FBI team through Ray Penbar in the episodes earlier. Ray Penbar wasn't suspicious of Light... but when Ray Penbar died then the entire L investigation focused on him.
It would have been a boring manga if one made Light a bit smarter or more ruthless and tried to stick to the same plot, yes. But that just means they could have tried a different plot, and explored a different part of the world: what happens when states react to a Kira and start switching to secret rulers and figurehead leaders? The most plausible explanation for a Kira would be some exotic form of nanotech or biological warfare, so what happens when states begin crash projects into developing their own assassination tools? What happens when Light reasons that criminals are a relatively trivial cause of death and instead kills Kim Jong-il? What's the fallout of that and what risks does he have to take to fix it? Instead of a second Kira being a fan of his, perhaps it could be one with very different goals and it becomes a fairer version of the L/Light duel (you don't even have to change Light's job); and for that matter, instead of being gray and apathetic figures, what if the shinigamis were the real villains all along and Ryuk's gift to Light was a... poisoned apple, one might say?
There's plenty of stories one could tell, and I think Ohba & Obata are more than talented enough to tell those stories without requiring asspulls or idiotballs.
So what we get in Death Note is a calamitous lead character that has to make middle schooler mistakes, that then suddenly develops some smarts: It's the only way to make the net grow close early on, but then withstand a few more books. But even with the whole second kira twist and all of that, it's very hard to make the story coherent, and kira not get caught very quickly after making the mistakes that are mandatory to make the story any fun. Ultimately, Ohba has to rely on making L also act in pretty suboptimal ways, just to make the first arc of the story last long.
Which brings us to how Death Note is a good example of why it's so hard to make realistic crime stories: It's very difficult to make a story long enough to not be trivial, and yet have the criminal get caught in the end: It's far easier to make a very good criminal or a hapless one than to make one that will move the story along at a good pace.