Photo: Eric Liebowitz/Netflix

The weirder and more random Unbreakable Kimmy Schmidt gets, the more enjoyable it is. Season two of the show is more enjoyable than season one because, for long stretches, it barely remembers what it’s about, plot-wise, and enters that trancelike comedy zone where some of the best sketch comedy resides — a place of one-damn-thing-after-another inventiveness.

For my money, season two hits Peak Weird in episode nine, which cuts between Kimmy’s relationship with one of her Uber passengers — a binge-drinking therapist (played by series co-creator and 30 Rock creator-star Tina Fey) who urges her to stop repressing the trauma of her 15 years of captivity in the cult — and her roommate, Titus Andromedon, obsessing over an audiocassette hutch. The episode is as perfectly structured as a half-hour of comedy can be while being mostly silly and dancing around the edges of anything emotionally big. Throughout the series, Kimmy (Ellie Kemper) deals with what is, for a sprightly sitcom character, some heavy-duty pain; emotionally as well as culturally, she’s still stuck in the ’90s and struggling to sync up with the present. The repressed past of Titus (Tituss Burgess) comes rushing back this season as well, and if you squint a bit, his meltdown over the hutch starts to look a little bit like an echo of the terrific opening episode in which his ex-wife Vonda (Pernell Walker) comes back into his life. The episode is filled with marvelous oddball grace notes, many of them of 30 Rock vintage, such as the succession of ’80s power-ballad parodies that play on the soundtrack (“Brother Baptist,” “I’m Convinced I Can Swim”) and Titus’s apparent slow-motion run toward Kimmy at the end, the ecstasy of which is punctured when Titus confesses that he’s just a slow runner.

Unbreakable Kimmy Schmidt is on firmer ground this time than it was in its first season, which sometimes tried too hard to be culturally or politically edgy — a mode that Fey and her 30 Rock collaborators had only intermittent luck with during the show’s long run on NBC. In season one of Kimmy, as on 30 Rock, the writers sometimes seemed convinced that they could traffic in racial, ethnic, borderline homophobic, or otherwise troublesome humor without fear of repercussion as long as they announced upfront that they knew the joke was offensive and turned it around at the end so that it landed on a clueless white person. The story line involving Jane Krakowski’s Jacqueline Voorhees embracing her hidden Native American heritage was one notorious example. The scenes with Jacqueline and her parents dealt rather bluntly with the repercussions of light-skinned Native people “passing” for white — this Indian Country Today article criticizes some aspects and defends others — but to this viewer, it all ultimately felt like a build-up to a scene of Jacqueline attacking a busload of high-school band nerds clad in “Redskin” uniforms and then howling at the moon like a Comanche warrior in a 1940s B Western. 30 Rock did that kind of thing, too. Whenever it did, the jokes left a sour aftertaste because it made the series seem self-congratulatory and clueless — as if it was so proud of itself for successfully sending up Tracy Jordan’s race-related opportunism (A Blaffair to Rememblack) that it figured it could do anything.

Many of Kimmy Schmidt’s season-two episodes play like 30 Rock with nothing to prove. They come across as outrageous without seeming as if they’re trying too hard to be outrageous. Many of them have a relaxed, almost blissed-out quality, as if the writers have locked onto a comic wavelength that they were only occasionally tuned into the first time out. My colleague Jesse David Fox gets at the mechanics of the show’s humor in his breakdown of just one joke from the season premiere: the flashback to Titus (a.k.a. Ronald) and Vonda making out while watching TV. The three pop-culture references in this scene — to Tim Meadows, David Spade, and Hootie and the Blowfish — aren’t just cute time-capsule nods; they develop both characters as individuals whose sense of what’s sexy defies any stereotypes you expect the series to indulge. Every couple of scenes there’s a gag like that one — a bit that plays on a particular set of expectations and then turns them inside out, like Jacqueline lashing out against the patriarchal authority of a car-navigation computer that eventually re-routes her to the “tampon store.” Kimmy Schmidt was a buzzy show in its first season because NBC rejected it as too edgy and weird for broadcast television, but it has already grown beyond that, and it’s carrying itself with the confidence of a sitcom that has nothing to prove. Another couple of seasons like this one and it’ll be a pantheon series.