At what point should I stop caring about writing papers after leaving academia? Some background: I'm near 40, I have a PhD, I work as a computer scientist at a Very Large Company's R&amp;D Lab, and I have about 35 reasonably non-embarassing publications to my name.

Writing papers is "encouraged" by my company, but it's not core to my job. My main job duties are managing projects and transferring R&amp;D ideas into products, and I get paid a very nice 6-figure salary for this. Frankly, I'm one of only a few people here who care about writing papers, and recently I've only had enough time to submit to workshops and mid-tier conferences.

At what point should I just stop caring? 

I keep saying to myself that once I reach 40 papers, I can stop.
You shouldn't feel any obligation to write papers if you don't want to and you aren't required to for your job.  At this point, you've written 35 papers, which more than repays any investment the research community put into training and mentoring you.  (This shouldn't be a concern in any case, but with so many papers you're extra safe on this count.)  

It will be a loss for the community if you decide not to continue, but you shouldn't decide on that basis unless you anticipate world-changing outcomes from your future papers.  Think of it from the perspective of someone reading one of those papers.  How would they feel if they knew you had forced yourself to write it at the cost of personal unhappiness?  If the paper leads to a cure for cancer, then they'd think you made the right decision, but for most papers they would probably feel sorry and wish you had chosen otherwise.  If the potential audience for your papers would feel sympathetic, then you shouldn't hold yourself to a stricter standard of community service than they would.  (I wouldn't assert the converse: you can legitimately quit even if the potential audience wouldn't feel sympathetic.  However, they probably would, and that may make your decision feel easier.)

Of course, quitting research may close off future opportunities.  If you'd like to move to a research university someday, or a more publication-focused industrial lab, then you'll need to maintain an active research program.  (Having done compelling research in the past doesn't count for much if you haven't published recently, since potential employers will assume that your knowledge and skills are rusty and that your not publishing recently reflects a lack of ideas or enthusiasm.)  Maybe research would be more fun in a supportive environment with coworkers who are also actively engaged in research.  If that's the path you'd like to take, then you should keep doing research while you figure out what sorts of jobs might be feasible.

However, if you don't want to write papers now and you don't anticipate wanting to do so in the future, then it's perfectly fine to stop.  You can quit with a clear conscience and be proud of the work you've done, without feeling any need to continue.