It's IME a relatively small miniority of machines hit this issue, maybe low single digits percentage, though which ones seems to be a crapshoot -- we see MacBook Pros last 10+ years and no battery issues at all, but some others get 5 years in then fail.
I have no idea how the environment affects it, as ours are deployed to similar types (urban dwellers in a fairly mild climate (though most travel internationally a few times a year)).
It all comes back to that owning a Mac is expensive if it only lasts 3 or 4 years, but if you can keep it for 10 and tolerate it being relatively slow then its a bargain; or, if you can sell it after 3, you can make a decent chunk back towards a newer one ... either way, the TCO p.a. is quite tolerable.
Desktop: E3-1270 v5, X11SAT-F, 32GB, RX Vega 56, 500GB Crucial P1, 2TB Ultrastar, Xonar DGX, XL2730Z + G2420HDB
HTPC: i5-2500K, DH67GD, 6GB, RX 580, 250GB MX500, 1.5TB Barracuda