The perilous state of the electric-vehicle battery industry is a welcome cautionary example