General advice can be derived from looking at things that have lived a long time: make your own interpreter/VM, build the application in that language, build the VM for every platform you want to support. Use an extensible "plugin" friendly architecture as far as possible. etc. Others have done real research on it.
It sounds like you dont have a specific purpose in mind, which means we get to speculate on all sorts of wild ideas for the fun of it. Best kind of project :)
Keeping hardware running in orbit is probably not as easy as you might assume. I dont know anything about it but theres a hell of a lot of ways things have gone wrong on satellites and I'm betting we haven't found them all yet.
also makes me think of "digital prayer wheel" email signatures... just how complex a piece of code do you want to run? Protective invocations against the darker corners of the mandelbrot set are often only a few instructions long.
I would be willing to bet that Linux is a software package that will be around as long as computers need an OS.
One software that people might not think about is the language COBOL. It's out of date but there are millions of lines of code that companies don't want to rewrite. So a company that could create a compiler that works on the latest hardware would survive many generations.