it works (mostly?) as it did in melee, where the damage stales a certain amount with each use, which affects knockback due to damage being a factor in the knockback formula.
i don't know how much it stales at max or the percent as it goes, but iirc, a move is fully staled after 4 uses.
the way staling/unstaling works is that there is essentially a list in the game's memory that shows the last 9 (is this correct?) moves that connected to an opponent, so not their shield, not whiff. actually hit. as the moves hit, they just move down from slot 1-9 sequentially, so eventually they fall off the list and are no longer used to calculate staleness.
i believe this is correct, but if someone has some data to show it concretely, feel free to put it up.