Try to give yourself enough space so that you don't have to shield within 3 frames (one twentieth of a second) of inputting a direction. When I say this, I don't mean actually think about the frames, I mean space yourself so you don't have to worry about the emergency situation where you have to hit the block button. If you press shield in that window you roll, which is not invincible the next frame like shielding.
Learn the fox trot distance to dash back multiple times if necessary, and even dash away a second time to immediate dash back (Smash 4 dash dance).
Don't hit directions pre-emptively. Move out as necessary to avoid incoming approaches or to get out of the range of extremely quick options. You can dash in to try to bait an action. If you don't have time do dash again, just shield, wd out as necessary.
Try to use longer dash dance lengths (the longest non-foxtrot ones) except when trying to make someone think you're doing a bad DD, then go further with the next ones, or when trying to fake an approach, or as necessary to move into place in time, or to deal with someone trying to find a rhythm in your DD (all of these have visual cues of varying subtlety you can pick up with experience). For slightly further spacing an similar timing, tap dash back->pivot grab as opposed to regular DD->grab.
Don't be afraid to just wavedash if your movement isn't pristine at the moment.
When doing tighter/closer DD where you hold direction, be ready to just keep holding that direction and go into full run, and pick up Cactuar dash for when you have the space (WD and shield are also things). JC grab/shield stop grab is preferably done out of initial dash in the case of the former, and exclusively in the case of the latter.
Obviously there's other options than grab, but I'm mentioning it because it's the easiest, the most applicable to various techniques, and usually the best anyway.
If you don't think you need to avoid a certain hitbox and get moving some other way in a small amount of time, there's not too much purpose to dash dancing beyond option coverage (often meaning you didn't need to do at least one of the dashes) or giving a deceptive visual cue to the opponent (baiting); all of which can be done at the same time. With that said, it's an amazing option, and the most important movement option in the entire game, more powerful than any move.