I believe HDPE is recycle code 2. 5 is PP.
AFAIK, yes HDPE is both heat and chemical resistant so should be fine, I use it all the time. In my experience HDPE holds up better than PP (5), but either 2 or 5 should be fine.
eta: HDPE is what laundry detergent bottles are made of, and a lot of soapers use those for long term storage of 50% lye solution.