I usually spend the night across the ST car at the Europasier Hof. The area I used to find very safe back in 2012. And I go every year and it has steadily been declining. It has really gotten bad since the refugee crisis. With a lot of misguided youth doing drugs, and a lot of idle young hanging out in the areas around the station doors.
Generally if you walk and pay no attention to it there is nothing to worry about. They are all fairly harmless a bit scary from the distance but harmless. It should be noted as well Deutsche Bahn has their security forces right at those entrances to run them out of the actual station. But they do not own the sidewalk outside of the station so they hang out right outside.
My advice just keep walking, pay no attention, and you'll be fine. Have a great time in München. I'll be there in three weeks.