I agree. Even "hardware" patents are too hard to defend to really be worth it most of the time (ex: fidget cube and other chinese kickstarter clones). You can't rely on patents to ensure defensibility to your business model, so they really just end up being money-sinks.
A US Patent has jurisdiction in the US. You can bar foreign companies from legally importing your patented inventions. US customs will seize such goods at the port or elsewhere if they are aware of them.
That isn't a real solution. Searches are imperfect and this forfeits the entire foreign market. I think Musk has the right idea on novel inventions, the only way to keep them secret is to actually keep them secret.
An honest patent forces a description good enough to duplicate. Better to keep your secret sauce secret.