Coworking giant WeWork is closing low-performing locations and targeting large companies that want more flexible office arrangements in the pandemic, a move some analysts say gives it a shot at a comeback from a high-profile initial stock sale collapse.