Tonga weren't so bad at the set piece that it would have made a particularly big difference to territory and possession. It simply doesn't account for the major disparity. Perhaps with a better set piece, Tonga would have spent more time in the Wales half. But they only lost 6 possessions (compared to Wales' 4) through the set piece, compared to 17 overall (20 for Wales), so I cannot think that it made the significant difference. Perhaps they would have started getting within penalty range, but challenging the try line? I doubt it. Wales were comfortable, and they would have been even if Tonga had held their set piece imo.
Tonga's major problem for me was that they struggled to put together even a small number of phases. Each team may have made a similar number of handling errors, but Tonga would make them a lot sooner than Wales.