There is risk for everyone. The customer risks lock-in to a retired person or out of business company or some sort of personality clash. On this level, I think that the customer is entitled to a copy of the program/configuration. On the other side, the programmer risks code acquisition by a competitor or being thrown into "open source".
Perhaps, some sort of escrow scheme could be worked out. I don't know if we could find a truly neutral 3rd party broker, acceptable to all parties. I think that the remote manufacturer should be the broker -- with very clear rules about when the escrow could be fetched. The manufacturer is in the best position to provide assistance to both sides when stale versions are encountered.
I'm not so worried about my code leaking out. I have a unique style and the programs are very specific to the installation. Another programmer will probably not enjoy working with my code and will burn too much time familiarizing. Besides, in some cases I use a privately developed code generator and little details that are a cheap trick for my code generator will be over the top for someone working only with the target code. However, in some cases I have licensed artwork that can easily be broken out by a skilled person and I would like to protect that artwork from an open release.