Yes, it's safe and lots of others will be dong likewise as you , ie heading to the station, luggage in tow.
At 05:29 If this is in the summer, it will be day light.
Berlin Hbf to Dortmund Hbf is a trunk line on the ICE train. I don't like cutting it close and would get to the platform 20 mins prior to departure. Locate your coach's arrival "spot" according to the "Wagenstandanzeiger" ...less taxing for you if the coach overshoots that spot. Since this connection is a trunk line , you can expect the platform to be crowded.
I've taken this line but later on in the day. If you have time the night before, I would suggest checking out Berlin Hbf, familiarize yourself with its lay-out, location of the signs, escalators, and all that, less pressure on you in the morning.