Capernaum could easily be Lars von Trier’s Lion — much more of a misery machine than Garth Davis’s eventually feel-good story about a fragile, street-smart child in crisis. There is no graphic onscreen violence here; co-writer director Nadine Labaki’s eventual pivot into grace is messy enough, less for its attempt at happiness than the authenticity (or lack thereof).

There is no deep-pocket foster family to deliver this film’s lead character from his predicament. Zain (Zain Al Rafeea) is the 12-year-old son in a large, impoverished, abusive and and criminally indentured family in Lebanon. He spends his days chasing down drugs with forged prescriptions, converting the pills to powder and liquid and then smuggling or selling the wares on the streets.

After his sister Sahar (Cedra Izam) is sent to sexual slavery the moment she has her period, Zain flees his home in anger. He finds shelter with Rahil (Yordanos Sheferaw), an illegal-immigrant custodian whose illegitimate mixed-race toddler, Yonas, would be seized if the government knew about him. A local fixer agrees to grant Rahil passage to a safer nation, but only in exchange for a toddler he can sell. Rahil draws the line there, and while she is kindly to Zain, there is something transactional in the shelter she provides: Zain can keep Yonas occupied and quiet while Rahil works and scrounges up enough money for both of them to get out. But when further misfortune befalls Rahil — and Zain and Yonas are left alone — the 12-year-old must rely on his urchin instincts to keep them both alive.

To eyes not versed in any political specifics, Labaki’s depiction of Lebanese squalor feels authentic enough and her guidance of Al Rafeea’s performance is outstanding. The young actor conveys a resiliency and compassion that outstrip his small frame; the Captain America shield on his pants embodies not just castoff clothing made available to him but ideals to which he aspires but need not articulate. (He eventually does, but more on that in a moment.) Labaki also lets us see Zain’s protective spirit buoyed by Rahil’s generosity and then whittled away by the wind of a world that seeks only to push back. The filmmakers has also gotten incredibly lucky with the toddler playing Yonas, whose reaction shots and interactions with Al Rafeea offer the immaculate indication of a caretaker’s bond.

And yet Capernaum can’t quite shake that feeling of a prototypical “awareness-without-action” film, cautious to keep us reeling in the knowledge that whatever comfort we see cannot be sustained and eventually too didactic for its own good. It starts with a faulty storytelling structure, telling Zain’s tale largely in flashback after a cognitively dissonant courtroom prologue in which we see Zain suing his parents for giving birth to him.

Zain looks, feels and acts like a kid his age in every scene but these, with a precocious awareness of his morality and existential angst that feels like the intrusion of all five credited screenwriters. It’s wildly overwritten, and that’s before it just … keeps … going in an effort to yank tears from you rather than stand as a tough, fair story about a nation in which children have become exploitable commodities rather than cherished treasures. One of the final images in Capernaum establishes the banality and bureaucracy of this existence better than any emotional grandstanding. It’s a well-meaning film that is too insistent in the wrong areas.