Ransford-Yeboah Königsdörffer and Rayan Philippe scored as Hamburg got their first away win of the season at Heidenheim on Matchday 21.