I think moJoe has a point. Holodeck and replicator techonology might start out being used for pleasure binges by many people. However, the problem generally takes care of itself.

Everyone who's hooked on conjuring up booze and babes would occupy the same niche as junkies in current society. They'd spend all their time and money on their next drunken cyber-orgy, would fail to succeed in society, and would be weeded out of the gene pool by natural selection.

It would be similar to the stories enshrined in the Darwin Awards. Just as Darwin Awards winners "remove themselves from the gene pool" by doing stupid things, the holojunkies would weed themselves out by being hedonists.

After they all disappear from society, Star Trek society could continue to develop, and given an optimistic point of view, Star Trek could still happen.