It's not a myth!
My uncle is such a garage inventor, and has made a comfortable living for himself by licensing a number of different inventions.
One of the things he invented was the Zipit drain cleaner. It's a long piece of plastic with barbs on it. You shove it down your drain, pull it back out, and it pulls out a gigantic disgusting hairball that you had no idea was down there!
It's really quite remarkable, it works so much better than what people were using to unclog their drains before. It seems obvious in retrospect, so why weren't such products already on the market?
Unfortunately after seeing the success a competitor decided to copy it and, when my uncle tried to sue, the competitor got the patent invalided. Meanwhile my uncle lost much of his savings in legal fees.
https://usinventor.org/portfolio-items/34660/
In my (biased) opinion, this was a case of a legitimate, deserving patent. But all the junk patents and patent trolls, and the arms race you describe, have shifted expectations so much that the patent review board now tends to invalidate everything brought before them. So now the patent system doesn't even work for the people it's supposed to work for, since when a small inventor makes something actually worth patenting, a big company can just invalidate the patent.
With all that said, I do agree that software patents are pretty broken. If nothing else, the 20-year time limit is way too long, as technology moves much faster than that. We are constantly building the next layer on top of whatever was invented last decade, so last decade's inventions have either become foundational or have been discarded. Patenting an idea means it has to end up in the later category, as a proprietary idea cannot be made foundational; the industry must work around it. Meanwhile, the upfront investment cost in software ideas is much lower than other kinds of inventions, so there's no need for 20 years of royalties to incentivize it. I think software patents could make a lot more sense with something like a 3-year time limit. But I'm not really sure it's needed at all, as first-mover advantage seems sufficient to reward many software inventions.
(Disclosure/disclaimer: I work for Cloudflare, but obviously the above is personal opinions. I am proud of what Cloudflare has done with Project Jengo -- which I had no personal role in, I'm just an enigneer.)