I've had both, but still have the ER-4P. IMO, the HF5 was 90-95% of the ER-4P in terms of musical experience -- nearly the same level of details and similar frequency response. But to me, the ER-4P just had an edge in musical cohesiveness. It's hard to explain, but the HF5 sounded more like I was hearing the parts here and there, but with the ER-4P the same song ingredients "added up to" music. "Cohesive" is the best way I can describe the ER-4P over the HF5 -- it is a quality that may only be important to (or even heard/perceived by) a smaller majority of people.
That was a couple of years ago when the ER-4P could be found for under $200 retail, about $150 gently used, and the HF5 about $110 new -- not so today. Bang for the buck, the HF5 is probably a better deal, and I tend to recommend it way more for people looking for excellence under $200.