If you want to go out and challenge DK offstage make sure you come from above
If you want to edgeguard from the stage, wait until he upb's and figure out if he'll be able to land on the stage with it or if he'll have to go to the ledge.
If he has to go to the ledge, wait until his upb is almost done and bair/dsmash/dair/nair him with fox or dsmash/dair/nair with ness. You can hit them him the side but it's a bit safer to go from above. Ignore fadeaways and jukes. After he uses upb you know the time he's gonna
have to be at the ledge, so just wait for that, but don't wait so close to the ledge that he can come in and hit you while you're just standing there
If they upb so that they can land on stage then go to the ledge and just shield, wait for their upb to run out, and then do anything you want to them
If they upb so that they're coming from really high up they'll probably end up living unless they're like >130% and you can kill them with uair, but if this guy sucks he'll probably do the same thing every time in that situation and you can just read how he'll land on stage and punish with whatever