Best way to "Button Mash" to escape a bury/grab
In addition to Tal's answer that points out that mashing in ultimate is the same as Smash 4, there is a trick that can help you get some more button inputs faster while using a GameCube or pro controller.
In the control settings you can rebind your d-pad from taunt to another input such as shield. This will allow you to circle the d-pad for four inputs in rapid succession.
Below is ZeRo (competitive Smash player) explaining the d-pad mash trick:
Unfortunately, this means that you will be unable to taunt. So you will have to decide for yourself whether the fast mashing is worth the cost.
The video you linked says in the description that mashing in Ultimate is the same as in 4.
So, depending on your preferences - you can either waggle or circle the control stick, or press as many different buttons as possible.
Circling the control stick is effective, but not quite as effective as pressing as many buttons as possible. To ensure button presses count, only hit one button at a time, and ensure that you don't hold buttons with the same inputs. Swiping your fingers around the controller in such a way to avoid hitting buttons with the same actions will maximize your mashing and minimize your grabbed/buried time.
For completeness sake, I'd like to add some numbers here. The Beefy Smash Dudes just recently released a video on Smash Ultimate Buries a few weeks ago. The video included some data on how long different buries actually are to give us something to compare them by.
In addition, they explain that mashing will help to shorten the time, but different mashes will reduce the time different amounts. An input like A, B, L or X will reduce bury time by .25 seconds or 15 frames. Directional inputs on your control stick on the other hand, reduce the buy by half that of the buttons, or about .13 seconds or 8 frames (however, the game only counts the cardinal directions--up/down/left/right--as inputs on the stick).
So it does seem like the most effective way is either to run your right thumb over A/B/X/Y repeatedly, or to remap your D-Pad like Malco suggests and then do the same thing on your left hand. While circling the control stick on the left will work (and be less painful than the other two), it will also be half as effective as the other options. As they say, "No pain, no gain."