There are 54 billion “useful” ways to pick the first match randomly for 6-team matches and 128 teams.
With each succeeding pick, the space of “useful” matches from which to randomly pick can be decreased using selection rules (e.g. don’t assign teams to back-to-back matches; when any given team has been assigned 3 matches (for a 64-match tournament) drop them from the search space; etc)
I don’t think it’s mathematically guaranteed that you will achieve a valid tournament following this simple procedure. You may come to the last match and there’s no valid match to pick from the remaining search space.
**