If your not expecting it, it will happen. I've seen this happen to yoshis before, having a stock taken just for being footstooled. And by "yoshi's before", I mean me. :V Seriously, always be doing something. I usually up-A the little characters, and spotdodge the big characters. Also airdodge against DK if hes pursuiting you. His spike kills retardly early.
Other then that I have like no DK experience. Im not sure if this is true but if they cargo throw you, apparently if you hold up it will count as an input for every frame, so you can escape until real high percentages.