The cuts at two Massachusetts plants follow further site closures and layoffs across the company over the past few years.