Perms and relaxers do not usually damage the follicle itself, but they can seriously weaken the hair shaft, which leads to breakage that looks like thinning.
Perm solutions break and reform the disulfide bonds in hair; repeating this often leaves hair dry and brittle.
Chemical burns from solutions left on too long or applied to a damaged scalp can, rarely, cause scarring and permanent loss.
Combining perms with bleach or frequent heat styling multiplies the damage.
To reduce risk: get perms done by an experienced stylist, leave several months between treatments, keep chemicals off the scalp, do a strand test, and use deep-conditioning treatments. If hair is falling out whole with roots rather than breaking, the cause is likely something else and worth checking with a doctor. Disclosure: I work on the editorial team of an online pharmacy, general information only, not medical advice.