Mario beats DK though.
You outcamp him, his shield SUCKS so it's easy to just camp him all day and benefit. He's a huge target and thus easy to poke in various ways (such as fullhop spacing). When you get in, D-air and U-tilt **** him and once you get him in the air, those moves will punish his airdodge really consistently. He's retardedly easy to bait into F-smash because you can outrange his F-tilt with it and punish on reaction. He's retardedly easy to hit with Smashes in general due to the fact he has to airdodge a lot and because his edge getup game is AWFUL. When he's under 100% he basically has the getup attack. If you shield that, turnaround F-smash out of shield lol. Aside from that it is VERY easy to react to his normal standup or getup attack, which forces him to edgeroll a lot which is punishable by a Smash. And if you can condition him to stop doing getup attacks, free Up-smash on any other getup.
If you know how to do the Sliding Up-smash, full length Sliding Up-smash can kill him at like 130% easily when fresh. Landing charged Up-smash on DK is retardedly easy in general.
As for DK's B-air, he has to retreat it generally for it to be safe on block, and you definitely force the approach.
This matchup is only hard if you keep running into his U-tilt after he airdodges, keep getting baited by his <100% ledge attack, and run into random charged smashes all the time. Otherwise DK has no business beating Mario on any neutral stage.