The weaker outlook could reflect some overcapacity at chip factories that had already stocked up on ASML’s pricey tools during the pandemic.