Could a severe cough hurt your lungs?

Inflammation... A persistent cough will maintain some inflammation in the airways which can cause bronchospasm and continued cough. This is the reason for a cough to remain even after a bronchitis infection has resolved. The treatment often includes a steroid inhaler to decrease the inflammation as well as a bronchodilator inhaler to relieve bronchospasm.
Yes. If the cough is forceful it cause inflammation of the rib cage and in rare cases may lead to pneumothorax which can be life threatening.