Li-ion batteries are critical in energy storage, but their increasing energy density has led to worries about their safety.