Using Amazon’s fulfillment network and AI tools, a historic New York factory forges their future with a new generation of customers.