score:2
Yes, in principle these products expand. This happens due to the lower air pressure at high altitudes (which means there’s less force squashing them together, so they can spread themselves out a bit more). Airliners and other passenger planes operating at high altitude are pressurised, but typically only to air pressures typically found about 6000-8000ft (around 2-2.5km) above sea level.
You don’t need to take any special precautions for this. Typical bottles used for shampoo, perfume, lotion, etc, are perfectly capable of resisting the pressure difference and holding the product in without significant expansion. If you’re carrying shampoo, toothpaste, etc, it’s probably wise to pack them within a (preferably sealable) bag, to make sure they don’t get all over your clothes if they do get out. But as long as you close the lids, that’s more likely to happen as a result of something falling on and squashing them than it is to happen due to air pressure.