The letter is the latest example of the business community’s stepping into a sensitive political area — sometimes reluctantly — during the Trump presidency. Business leaders have criticized Mr. Trump’s immigration policy and his response to the white supremacist violence in Charlottesville, Va. On guns, the president has on several occasions offered support for stronger firearms policies before stepping away.

Some of the letter signers plan to lobby lawmakers in Washington, but it is unclear how much money, if any, the companies may devote to this issue.

Some executives signed on without hesitation. Others mulled it, often creating a raucous debate inside their offices and among their boards of directors, only to decide that the political risk was too high. More than a half-dozen executives spoke about their deliberations on the condition of anonymity because of the sensitivity of conversations.

Mark Zuckerberg of Facebook did not sign, although he told colleagues and peers that he agreed with stricter background checks, two people involved in the conversation said . With Facebook under federal scrutiny — and contending with a drumbeat of criticism from Republicans who contend that the company’s platform silences conservative voices — Mr. Zuckerberg has decided that activism on this issue would only intensify the spotlight on the company, these people said. Others inside Facebook made the case that it was a moral responsibility to press for more responsible gun sales laws.

Similar concerns were raised by the leadership at Google, whose YouTube unit was the site of a shooting last year. Google recently announced an internal policy that would make it hard for the company to consider signing the letter. That policy includes this line: “Our primary responsibility is to do the work we’ve each been hired to do, not to spend working time on debates about non-work topics.”

Uber’s chief executive, Dara Khosrowshahi, signed. His company’s policy bans guns from its vehicles, either for drivers or passengers. Lyft, Uber’s main rival, signed as well.