The good thing about being a sequel to “Ouija” is there’s no way to go but up. There was no reason a movie based on a bogus “spirit board” anyone can buy at CostCo had to be a humorless slog, but them’s were the breaks in the 2014 Halloween hit, which offered boo moments with all the oomph of an accountant filing clients’ annual taxes. The prequel “Origin of Evil,” by contrast, tries hard. It might even try too hard. Thoughtfully directed by Mike Flanagan (“Oculus”) for maximum creepage, it also can’t help but trip up on its own byzantine, arbitrary rules, gamely trying to pretend it’s not turning into a stock horror mush that just so happens to be the weirdest ever piece of product placement.

Elizabeth Reaser is “Origin of Evil”’s token overqualified performer, playing Alice, a widowed occultist living in 1960s suburban L.A. whose seances are — shades of Peter Jackson’s “The Frighteners” — a total scam. Also like “The Frighteners,” she’s not wrong: There really are ghosts, and one of the nastier ones has taken root in her home. Soon, this ghoul has possessed her youngest daughter (Lulu Wilson), who begins acting like a precocious horror movie kid: Shooting long stares while smiling, standing behind unsuspecting people and, at one point, rattling off a long, show-stopping monologue about what it’s like to be strangled. For some reason, Alice thinks this pesky spirit belongs to her loving, late husband, and doesn’t realize she’s wrong until things abruptly escalate into not-unenjoyable nonsense.

Even when people are scampering about ceilings or turning into Chris Cunningham monsters, Flanagan tries his best. The scares come laced with wit, including a genuinely original bit involving a noose that doubles as a bungee cord. Before he has to deliver the goods, Flanagan lathers up the tension but good, ODing on creepy-crawly camerawork and shooting the hell out of the Ouija board itself. He knows the value of background space; one key revelation is delivered via a bravura, De Palma-esque split-diopter shot: someone way up close in the foreground, something else in the back, both in chillingly crisp focus. Flanagan even cares about his doomed bodies, with Reaser delivering a performance that juggles trauma with real personality. She even nearly sells a subplot in which Alice flirts with a quietly dreamy priest (Henry Thomas) who suspects this all has to do with, ahem, the Holocaust.

Dodgy franchise and all, “Origin of Evil” has so much going for it that it’s a shame it can’t get its stuff together. For all Flanagan’s formal precision, he can’t rein in a screenplay (which he cowrote) that needs another draft, that still struggles to connect the family’s grief with some convoluted malevolence from the past. What he doesn’t care much about is tying it to the first, which is a good thing: Though it’s technically an origin story about the freaky old-timer played by scream queen Lin Shaye — seen here as the eldest daughter (Annalise Basso) — it’s content to be just another tale of the Ouija board. It would work fine as its own thing, with a better sense of mood, expert shot placement and some actual jokes. You want to give it the benefit of the doubt; you also respect it enough to be honest and say it doesn’t really work.