Just to say no-one has yet mentioned that there are the customers as well, who may be waiting for the new product. Or if no-one knows about it yet, all the people who may find it useful once developed. As a sole trader developer myself, so no issues with employers or employees, and no questions about being hired by someone else - they are the ones I have uppermost in my mind when developing products.
If you do need to move, then the tips about offering to be a consultant after the move, and making sure your code is well documented before you leave seem like good advice. Also explaining the situation to all concerned and trying to make the transition as easy as possible for all concerned.
There's no need to way up the pros and cons about how much you will be benefited long term either way, it's the only decent thing to do as a human being who cares about others. Which you obviously do by your question. If you don't care about others then life soon isn't really that much worth living.
Some scientists seem to reason like this: because human beings have evolved to be fit to survive, therefore, one should act to ensure ones own survival and venefit as paramount.
But that's a confusion of things - the mind and body are shaped by evolution for sure, and with capacities and capabilities that help us to survive, but no moral imperatives arise from that, we are able to think independently and can make our own decisions about what to do with the mind and body. Evolution has just developed a body and mind with certain capabilities.
Similarly when you buy a new car, many of them are carefully developed to be driven safely at enormous speeds well beyond speed limits, over 100 mph, but that doesn't mean you have to drive at 100 mph all the time, or at all.
And physically some things are just impossible to evolve. You can't evolve a bird with heavy wings and strong heavy muscular legs, because useful as heavier bones would be on the ground, it wouldn't be able to get off the ground. Similarly some things that might be of survival value in the mind may be incompatible with other things.
In the same way I think it is surely impossible for evolution to create a living intelligent being sensitive to emotions and feelings of those around them without any sense of sympathy for others and recognition that they have the same issues and problems and suffering as you have yourself. Because sympathy is something that arises naturally as soon as you have a mind that is aware and sensitive in that way.
You can fight against feelings of sympathy, you can hide them, you can run away from them, your life can be just a huge struggle to ignore them, but I think no human being really doesn't have those feelings at all no matter how much they may think they are immune from them.
Some, e.g. perhaps autistic ? may seem to have much less awareness than usual of other's feelings and emotions - But when that happens, then they are to a fair extent handicapped from functioning properly as a social animal. And I think still, not immune from sympathy.
http://en.wikipedia.org/wiki/Empathy#Autism_spectrum_disorders
"What is clear is that, while people on the spectrum may not respond easily to external gestures/sounds, they do respond most readily if the initiative they witness is already part of their repertoire. This points to the selective use of incoming information rather than absence of recognition. It would appear that people with autism are actually rather good at recognition and imitation if the action they perceive is one that has meaning and significance for their brains.
As regards the failure of empathic response, it would appear that at least some people with autism are oversensitive to the feelings of others rather than immune to them, but cannot handle the painful feed-back that this initiates in the body, and have therefore learnt to suppress this facility.
An apparent lack of empathy may also mask an inability to express empathy to others, as opposed to difficulty feeling it, internally."
So anyway, so it's okay to feel sympathy and empathy in this way, and to act on its basis, with wisdom and patience and tact, which you also need to handle difficult situations.
Hope things work out well
:).