There's a mutual sharing of credit when it comes to how Star Trek and Star Wars propagate.
Obviously before Star Wars, there was Star Trek. Star Trek provided some pretty epic storytelling, and very human storytelling despite its resources at the time. Granted, ST does owe some of its existence and creativity to the likes of Forbidden Planet, which established many sci-fi/space fantasy trappings that are pretty much taken for granted in today's sci-fi/space fantasy environment. Star Trek paved the way for imaginative sci-fi on a weekly basis, and for sci-fi movies to come.
Flash Gordon was a large inspiration for George Lucas, as indeed were the other authors/directors you cited, Horatio. I'm pretty sure that Trek has its place among that list as inspiration for Star Wars as well.
Star Wars, in turn, paved the way for gigantic cinema, high adventure, and space fantasy...but it also blazed a trail for Star Trek to follow in terms of cinematic splendor. This was pretty evident when Paramount decided, as a result of Fox's success with Star Wars, to cancel the series "Star Trek Phase II" and make a big screen translation of Star Trek. Star Trek The Motion Picture even made use of the services of effects wizard John Dykstra, who did work for both Star Wars and the original Battlestar Galactica. Star Trek TMP was a financial success, if not a critical one, and it paved the way for Star Trek II, which was made for I think about half the budget of TMP (largely because of the reuse of some sets, as well as stock footage from TMP). But its space battles were clearly influenced by the epic, big screen appeal of Star Wars....especially with the rapid firing pulse phasers/gatling phasers featured in their space battles. I will say that the battle in the Mutara Nebula was certainly beautiful, and unlike anything seen before.
Both franchises told human stories. Star Trek is based somewhat on science and science speculation, but still knew how to create fun for its audience. Star Wars, not so much on science, but it just asked you to suspend disbelief and enjoy....you're in for one hell of a ride.
I find fun and entertainment in both. They have their strengths and their weaknesses, but I am far more forgiving than The Emperor.