The year’s second movie targeting so-called gay conversion or reparative therapy hits many of the same beats as its predecessor “The Miseducation of Cameron Post,” but they’re worth repeating, especially when delivered as sensitively as they are by Joel Edgerton in “Boy Erased.”

Adapted by Edgerton from Garrard Conley’s memoir, the narrative centers on Jared Eamons (Lucas Hedges), a college student from a fundamentalist Arkansas family who’s sexually assaulted one night by his roommate Henry (Joe Alwyn). Concerned that Jared might reveal what he’d done, Henry calls his parents Marshall (Russell Crowe) and Nancy (Nicole Kidman) posing as a school counselor and informing them that their son has been charged with initiating the improper conduct. Marshall, owner of a car dealership and a rousing preacher in their church, decides that Jared should be sent for conversion therapy, and Nancy complies with his judgment. Even Jared, who confesses his interest in men while denying the specific accusation made against him, agrees to go.

Much of the film is devoted to the regimen at the therapy center, where Victor Sykes (Edgerton)—assisted by his stern office manager Michael (David Joseph Craig) and sterner enforcer Brandon (Flea)—conducts sessions with Jared and his fellow patients, including brooding Jon (Xavier Dolan), who appears to take the program seriously; cunning Gary (Troye Sivan), who’s feigning progress in hope of being released; and Cameron (Britton Sear), a nervous boy singled out by Sykes for harsh treatment. But intercut with that material are flashbacks to Jared’s experiences with his one-time girlfriend and his relationship with his parents.

Ultimately Sykes’s methods cause Jared to rebel, retrieve the phone that had been confiscated and call home for help. In the aftermath he decides on the course he will take in life, and a postscript—none too surprising, in view of Conley’s writing career—dramatizes his later relationships with both Nancy and Marshall.

The individual episodes in “Boy Erased” mirror many found in “Cameron Post”—it’s almost inevitable, for example, that a suicide will occur, and not terribly surprising whose it will be. But generally Edgerton’s hand at the helm is more subtle than Desiree Akhavan’s was in that film, and he secures exceptional performances from Hedges, Kidman and Crowe, along with very good ones from an eclectic supporting cast, including Dolan (himself a director of note) and singer Sivan. Edgerton himself contributes a solid turn as the intense but clearly misguided Sykes. (A closing caption informing us of what happened to the man on whom the character is based is instructive.)

On the technical level, the film strives for a sense of simple authenticity, which Chad Keith’s production design and Trish Summerville’s costumes provide, while Eduard Grau’s cinematography and Jay Rabinowitz’s editing help to maintain a somber, stately mood without overdoing it. The understated background score by Danny Bensi and Saunder Jurriaans is augmented by two songs by Sivan.

Conversion therapy, as an end title informs us, is still legal in nearly forty states, and it’s estimated that some 700,000 youngsters have been subjected to it despite concerns about its effects. By avoiding turning exponents of the controversial treatment into monsters while underlining its dangers, Edgerton’s film can serve to stimulate debate; fortunately, it’s a powerful drama as well.