pummel when you grab. just hit A or the grab button when you do a grab
try recovering as close to the edge as possible so you can grab the ledge. also save your second jump and use a side b move to gain distance (depends entirely on the character, some like luigi or rob have an easier time), then jump and use up b (or another move with upwards momentum like luigi's down b) to make it to the ledge.
the rest really depends on what characters you main, you said you main ness and so do I so I have some

use neutral air when you're getting comboed to quickly escape. if they're too far away, any aerial except for down air should do the trick.
don't spam pk fire
don't spam pk fire
DON'T SPAM PK FIRE
if an enemy shields it, you are left extremely vulnerable. make sure that the enemy is prone before shooting it outward.
if you hit a wall when you use pk thunder, you can use it again. it only works once, though, so be careful