Photoionized Herbig–Haro objects in the Orion Nebula through deep high-spectral resolution spectroscopy – I. HH 529 II and III