Apple Inc is within striking distance of a $3 trillion market capitalization, a milestone that would make it as big as the world’s fifth-largest economy after Germany, just over a year after breaching the $2 trillion mark. Shares of Apple were up 1.6 percent at $174. They need to trade at $182.85 to hit the mark and cap a strong rally that has been powered by investors betting on its brand and viewing it as a comparatively safe haven. The stock has jumped about 30 percent this year on top of an 80 percent surge in 2020. In comparison, the S&P 500 has risen 25 percent for the period. Its peers in the trillion-dollar club—Microsoft, Amazon, Alphabet, and Tesla—have all gained between 10 percent and 70 percent. “Apple does seem to be more immune to the ebb and flow of economic forces just because of this really strong brand. Its …