I have a 1997 Montero Sport, 3 liter V6, manual transmission, off road package, with about 190,000 miles on it. It has developed a strange starter problem.

I parked it at the airport for one week, and when I returned it wouldn’t start. The starter would do nothing, but the lights, windows, and radio worked fine. AAA tried to jump start it, and nothing happened so it was taken home on a flat bed.
It was parked in front of the house for a couple of weeks, and then it started.
It started for a while, then it wouldn’t start again.
A mechanic friend suggested I replaced starter relay, which I did, and it started.
It started for a while, then it wouldn't start again, although it would compression start (I live on a hill).
My mechanic friend suggested I give the starter a few good wacks with a hammer, so I did, and it started.
Then the starter was replaced, and it started for a while, and then it wouldn't start again.
I don't drive it all the time, so it may sit for a week or two or three at a time. Whenever the starter doesn't start, all the other electronics work fine, and it will compression start. Then it seems to work for a while, until it sits for a while, until the other day.
It wouldn't start so I compression started, but then it wouldn't restart later that day, and I wasn't on a hill to compression start it. So I hit new starter with a hammer and it started.

Does anybody have any idea what is going on with my starter/electrical system, or is my Mitsi possessed?