What if the science in Frankenstein was replaced with Magic, the story would be unaffected pretty much. So as a thought experiment, if the space element cannot be removed without collapsing the story, could the space element be replaced with a different backdrop with only minor changes to plot? I think the majority of space movies could be replaced with a different setting and the story would still work (it may result in a less entertaining movie of course, cos ya know, SPACE!). Lets see. Moon - Needs a modern or future setting to cover the major plot surprise but as @Kleinbl00@ mentions it could be an island or somewhere else inhospitable. Deep underground perhaps. -- Not a space movie. Wall-E - The humans didnt leave the planet, they just left the dirty city and mended their ways. They left a child behind who was raised by a cockroach... Add in a macguffin to replace the plant and away you go -- Not a space movie. 2001 - Due to the amount of different ideas in this movie it would be difficult to reposition it anywhere else. Rather than skipping 4M years you could skip 400K years and try to work the story into a sailing into the unknown ocean but you rapidly run into problems regarding the other elements of the story. A sentient compass... the final transformation... It would be impossible to attain the same level of wonder on earth -- SPACE movie. Gravity - Reposition the story on a small boat far out at sea, Sandra grapples with a radio antenna at the top of the mast while George calmly talks her through her fear of heights, in the background we can see the small boat below them coming in and out of view as the mast sways in the strenghtening breeze. "Wind is picking up, time to get down" George states firmly, dark clouds gather on the horizon... Sure you lose the nice scenery but the story remains the same. Star Wars - Nope -- Naval Wars. Solaris - Nope. Contact - Nope Event Horizon - Nope, mix sailors and the Mary Celeste found far out at sea and see how far you can get. Silent Running: - Needs robots or some equivalent, doesnt need space -- Nope Planet of the Apes: - Replace with time travel, stasis or something else and away you go. Nope. So apart from 2001 none of these movies use their setting for more than a pretty backdrop. They don't grip the context enough to prevent them being repositioned with minor changes.
There's always the danger of reductivism for the sake of reductivism, though. Georges Polti argued there were only 36 dramatic situations; Aristotle broke it down even further than that. Also keep in mind: the basis of this discussion is the argument that "Star Wars" isn't sci fi. That right there pretty much makes the entire discussion esoteric at best. I think it's important to distinguish between "does the 'space' element matter to the story" and "can the 'space' element be replaced and still have a story." "High Noon in space" is still in space; it's a different movie than "high noon." "Samurai movie in space" is still in space. And, as discussed previously, Alien was originally set on a B-24 liberator in WWII but the movie as made does not happen on a B-24. It's not like any of this is binding anyway... but I'm cautious about defining away anything that anybody normal would consider a "space" movie. Eliminating Moon, Event Horizon and Silent Running does exactly that.
Oh we are definitely off the beaten track in terms of typical definitions, I personally wouldn't make the assertion that Star Wars is not a sci-fi flick or that Gravity is not a space movie outside of this post. My point was that the space element within the movies I listed played (to different degrees) more as a backdrop to the story rather than being a fundamental irreplaceable part.