No, Trek was not always escapist. It used to be about the possibilities of the future. Our future.Star Trek has always been escapist fantasy. And there is absolutely nothing wrong with that.
You're right that there's nothing wrong with entertaining escapist fantasy, but escapist fantasy takes you away to another world, whereas the best science fiction takes you deeper into what it means to be a human being in this world. And, in days past, Star Trek did just that. Not always well, mind you, but it at least tried. It doesn't have to have a moral or preach or predict anything, but it should use an SF setting to open us up to our own possibilities, to, as the myths of the past once did, pitch us out, not wrap us back in to where we've been all along.