Can a poor work history reduce your chances of acceptance into graduate school and/or later securing a tenure-track position?
As most things, it would depend. However, given the cumulative information from your posting history, I believe that your spotty work history would be flagged as a concern. Graduate committees will most likely focus first on your letters of reference, transcripts, and Statement of Purpose - not necessarily in that order.
What is unique about your situation is that you are 38, and as you say, you have not worked except for but a few years. If you were much younger, a sporadic work history might not be flagged as seriously. If you apply, you will need to be prepared to answer, why in your 38 years, you haven't been able to 1) find a career or 2) hold any type of regular position.
As far as tenure-track jobs, they will most likely focus on 1) your research output and 2) your letters of reference during your PhD.
If you feel that your sporadic work history is going to work against you, be ready to address this in your Statement of Purpose and work hard to get three good recommendation letters.