In the end, Hugh Hefner’s vision of sex was too narrow for American consumers. (AP)

There is some irony in the fact that Hugh Hefner died just as HBO launched its critically acclaimed series, “The Deuce,” which celebrates the emerging sex-trade industry in New York City’s Times Square in the early 1970s.

Showcasing the beginnings of the modern pornography business, when 25-cent loops and poorly lit, furtively shot films were the industry standard, the series — almost an ethnographic tour — focuses on a moment in time when Playboy was king. As “The Deuce” opens in 1971, Hefner is in his heyday and his magazine’s circulation is about to soar to 7.2 million, its all-time high.

Yet the makers of filmed pornography, which was more graphic and arguably more stimulating than the magazine’s famed centerfolds, were already laying the groundwork for the demise of Hef’s empire. What happened amid the thriving street culture of sex workers, pimps and corner hustlers on 42nd Street between Seventh and Eighth Avenues challenged — and ultimately triumphed over — Hefner’s heterosexist, classist vision of the good life for Americans in the postwar decades.

Hefner’s utopia, populated by suave, charming playboys enjoying the no-strings-attached sexual favors of sensuous, adoring young women was a brittle fantasy world, one undone by the realities of the sex trade in cities like New York. By the 1980s, as queer and feminist political movements gained political and cultural influence, Hefner’s sexual worldview no longer dominated. But before Hefner was eclipsed, he managed to enlarge the national conversation about sexuality in ways that supported greater freedoms.

Hefner’s early success, as the historian Elizabeth Fraterrigo explains, was grounded in his ability to identify and soothe what he described in the first issue of Playboy as “the anxieties of the Atomic Age.” Those anxieties extended well beyond the bomb. The men Hefner hoped to reach worried about social disapproval for premarital and pleasure-driven sex, the burdens of being the family breadwinner and the soul-killing nature of American postwar office work. Hefner reassured men like Tom Rath, the public relations specialist portrayed by Gregory Peck in the 1956 film “The Man in the Gray Flannel Suit,” that there was more to life than conforming to corporate norms — that they could still hope to experience something akin to self-determination and fun.

In so doing, Hefner hit on a remarkably successful formula: consumer-driven masculinity. By encouraging men to pursue the playboy lifestyle by purchasing expensive stereo equipment, elegant sports cars and designer clothing, he also ensured that they would continue in their breadwinner roles. This rendered Playboy safe in the Cold War era of heightened anxiety about the stability of the American family. Hefner’s brand of sexual pleasure wouldn’t turn men into layabouts or communists because it required a steady paycheck and a commitment to consumer capitalism.

By routing sex through consumerism, Hefner made it safe, knowable and ultimately boring and trite. Sex to Hefner was what democracy is to many Americans: a pageant, a comforting narrative, but not the actual thing itself, which is altogether messier and more complicated than Mr. Smith going to Washington or the airbrushed body of the girl next door. What Hefner was serving up was sexual fantasy, not sexual reality.

When the new sex industry actually materialized on the urban landscape some years later, it looked less like Playboy and more like the subterranean, shadowy world of “The Deuce.” Hugh Hefner was an American sexual pioneer and consummate entrepreneur, but not, in the end, much of a sexual architect.

That disconnect can be seen in the changes in the urban sex industry in the 1960s. In June 1964, while girlish Playmate of the Month Lori Winston posed in an antiseptic suburban house decorated with striped wallpaper and Colonial-style furnishings, Carol Doda became the nation’s first topless dancer in San Francisco. In 1969, film audiences watched “Midnight Cowboy,” starring Jon Voight as a young Texan turned Times Square hustler who survives by servicing both male and female clients.

From there, change came rapidly. More liberal obscenity laws stemming from the 1957 Supreme Court decision Roth v. U.S. facilitated the spread of adult bookstores and greater distribution of X-rated material. And as white flight ended investment in urban downtowns, those landscapes were suddenly ripe for the emergence of small storefront theaters that exhibited the first hardcore pornography films in the 1970s.

None of this looked like the sexual world envisioned by Hefner. The communities where urban sex cultures flourished were more diverse in terms of race, class, age and sexual orientation than what readers saw in Playboy’s pages. They were more sexually fluid, with less clear boundaries between men seeking the spectatorial pleasures of women’s bodies on pages and screens, and men cruising for sex with other men in public spaces.

In fact, the true prophet of Times Square was not the urbane Hefner with his tastes for Picasso, Nietzsche and jazz, but the crude countercultural sex rag Screw’s unapologetically grotesque Al Goldstein, who glorified in wallowing in sleaze. The diverse sexual representations of the 1970s reflected Goldstein’s varied tastes. Early transgender smut, proud gay liberationist hardcore films, erotica for women, conservative Christian erotica, as well as violent misogynist fantasy all found a home in ’70s porn, and almost none of it resembled Playboy.

As the 1970s progressed, Hefner continued publishing highbrow editorial content and interviews with cultural powerhouses like Huey Newton, Jimmy Carter and Bob Dylan. This approach maintained Playboy’s journalistic clout, but not enough readers actually bought Playboy for the articles. Increasingly, they were seeking greater sexual explicitness.

That fueled the epic “Pubic Wars” between Playboy and upstart Penthouse, which arrived in the United States from London in 1969. In early advertisements, Penthouse founder Bob Guccione declared that he was “rabbit hunting,” depicting the famous Playboy bunny in the crosshairs of a rifle sight. He and Hefner fought to outdo each other’s explicit content, which resulted in Hefner publishing Playboy’s first full frontal centerfold in January 1972.

Larry Flynt issued yet another challenge to Hefner when he introduced Hustler in 1974. Flynt positioned his raunchy, lowbrow magazine as the anti-Playboy, appealing to racism, sexism, misogyny and the revolt against an upscale elite that would fuel much of modern conservatism, ultimately yielding Donald Trump.

Trump was somewhat of a Playboy archetype himself, with his penchant for unwanted sexual advances, young supermodel girlfriends and multiple divorces layered on top of the myth of a self-made multimillionaire. Trump appeared on the magazine’s cover in 1990. (Ironically, Hustler featured him as their “A‑‑hole of the Month” that October, lambasting his “crass, self-promoting vulgarity.”)

In the 1980s, as the price of home video recording technology fell and made the VCR a household staple for millions of Americans, the market for printed pornography dried up. These technological advances moved live-action pornography consumption out of theaters and into living rooms. Consumers could increasingly choose content that catered to a panoply of sexual tastes, much more specific (and fetishized) than the typically milquetoast Playboy centerfold. During that decade, the last remaining Playboy Clubs, still operating in Chicago, Los Angeles and New York, closed.

Of course, by that time, the Times Square featured in “The Deuce” no longer existed, having come under vitriolic attack by Broadway theater owners, feminist anti-pornography activists, politicians and New York City gentrifiers. “The Deuce” was replaced by the tourist-friendly Disney version of 42nd Street with stores like Levi’s, Sephora and Disney, as well as a mega-Applebee’s restaurant featuring floor-to-ceiling windows. In its own safe, sanitized, appearance-conscious and consumer-oriented way, this Disneyfied Times Square hews closer to Hefner’s vision for Playboy than the area’s sexed-up landscape in the 1970s.