High-resolution X-Ray Spectroscopy of the Seyfert 1 Galaxy Mrk 1040. Revealing the Failed Nuclear Wind with Chandra