A former New York City official who helped coordinate the city’s response to the pandemic was fired from his private-sector job after a recording showed him talking about attending a sex party and other private gatherings when the city was urging people to practice social distancing.