The presumption of guilt predates the Napoleonic Code, which in fact brought far more fairness and justice to the citizenry than they had previously enjoyed. It unified the legal code for the country and removed the privilege of station from the Church, nobility, and prominent citizens, and provided for legal counsel for everyone.
"Guilty until proven innocent" isn't the most prominent feature of the Napoleonic Code nor is it as simplistic as it sounds, though unfortunately it's the one most often quoted.
As for the "court of public opinion", it's more the "court-of-public-opinion-fueled-by-social-and-other-media-and-driven-by-uninformed-prejudice-and-bandwagon-jumping". Accusations of sexual assault can never be recovered from, no matter how overwhelming the evidence may be that exonerates the accused. We have somehow turned 180 degrees from years ago and now accusations are enough to ruin a career and a life, even anonymous ones. We accept statements from alleged victims as gospel, even as they refuse to identify themselves, and woe to anyone who questions their validity.
As a 'bonus', the destruction of reputations has become a circus sideshow and fodder for countless Internet forums and TV shows, as so-called experts weigh in without having any personal interest or involvement. The public hysteria builds until the accused has suffered a de facto lynching, facts and due process be damned.
Compared to all that, the "guilty until proven innocent" model of pre-Internet days, however misunderstood, seems positively benign.