No attempt has been made to bring someone else in (either internally or a new hire) to understand the algorithm and the code behind it? Even if this guy is obnoxious, it's smart to have a back up plan in case he leaves.
From what I've seen, people in that position almost never leave.
It seems like for those folks, the most important thing is to be irreplacable. They like being needed, they like being a key person in the operation, more than they like money or doing a good job.
Even so, what if the obnoxious programmer gets hit by a bus? What if a critical production issue crops up just after he gets ill and takes PTO/sick leave for several days?
Oh yes, I think it's a terrible place for the business to find themselves. It just seems like getting hit by a bus is the only way they leave the organization--they'll even stay through retirement!
Anyone who wants to own some part of the business that thoroughly is a liability.