The other answers are all good, but I’d like to add another factor.
Airlines are required to pressurize the cabin for passenger comfort and safety. By law, they can’t go above 8000 ft apparent altitude And most airlines hold it to much less than that, averaging around 6000 ft.
In contrast, cargo holds may or may not be pressurized. Even in pressurized holds, the pressure can be less than the cabin. This limit is about 3000 m. (10,000 ft) Unpressurized cargo holds are in aircraft limited to about 10,000 m.
The pressure at sea level is 14.7 psi. At 10000 ft it’s about 10.1 psi. At 10000 m it’s less than 4.36 psi.
Batteries are sealed and cannot equalize the inside and outside pressure. So the pressure on the battery is 0 at sea level, 4.6 psi at 10000 ft and 10.3 psi at 10000 m.
Assume your battery is, say, 2 inches wide by 6 inches long by 1 inch thick. That means the biggest sides have an area of 12 square inches and will see pressures of 55.2 pounds and 123.6 pounds respectively.
Battery cases are tough and can probably take it; at 10000 ft at least. But if the battery is defective, it may already be under pressure. Often, the first sign of a defective battery is a bulging case. In that event, the lowered pressure may be enough to rupture the contents.