It is possible to reduce the risk of PIE and PIH, to an extent, with some care to the skin:
Avoid picking or squeezing to reduce inflammation and prevent the formation of both PIE and PIH.
Using broad-spectrum sunscreen with at least SPF 30 daily when one is going outdoors is better.
Try active anti-inflammatory ingredients such as niacinamide or green tea extract.
Follow proper skin care routines to avoid irritations and other problems that may dent the skin.