The handicap games (or teai 手合 in the Japanese terminology) system already existed for over a millennium that can be found in 棋經十三篇 (likely compiled in the 10th to 11th century, with lots of contents we know came from even earlier sources) in the collection 忘憂清樂集 (earliest printed version as early as 12th century)
It reads “凡棊有敵手,有半先,有先兩,有桃花五,有北斗七”, there is even an interpretation called “論棋訣要雜說” add footnotes about the paragraph
敵手 : “強弱均而爭先,謂之敵手” (strong and weak are even, and fight for the first play)
半先 : “強者饒弱者兩局先,弱者復饒強者一局先,所饒之子強者在中,以三局為一周” (basically the definitely of sen-ai-sen, weak player plays first, and then strong player plays first, and then weak player plays first, 3 sets of games in a cycle), etc. This paragraph is likely also compiled no later than the 12th to 13th century.
These contents are basically retranscribed in the more famous 玄玄棋經 which was compiled and first printed in the 14th to 15th century, and widely spread and reprinted in the 16th century (we have lots of versions of it that still survive). They were highly regarded in the Japanese Go community for hundreds of years, and were likely sources of their adaptations of the system. The custom of names of the “rankings” came from these as well.
Before the dan ranking system (and concurrent with the ranking system), there was already names for “player strength”, from the weakest to strongest “拙手”, “巧手”, “高段/高手”, “上手”, and they are likely inspired by the paragraph of ranking (品格篇) in the 棋經十三篇, with 9 pin (品) rankings, “守拙”, “若愚”, “鬥力”, “小巧”, “智”, “通幽”, “具體”, “坐照”, “入神”. There is no coincidence that the dan rankings were also mapped into 9 rankings.
The interesting thing is that the natural rankings likely were about a one-stone gap from 拙手 to 巧手, from 巧手 to 高段, and from 高段 to 上手 (名人 Meijin we know came later, and a special placeholder for the strongest players, not necessarily a “ranking”). The Great Houses and Godokoro (碁所) mostly just make the “準” ranking (qualified/semi) ranking already existed like 準上手, 準高段, 準巧手, as the fine ranking gap, and give numerical for dan rankings within the great houses (巧手, ranks lower than 5 dan), so players can compete/measure across the great houses (most of the time, used the “strength of player pool” as political tools to gain favors, and candidateship for the castle games).
The basic math of winning two out of three, and three in a set, had been around, at least in the 1st millennium, but likely a bit alien to us, and still not quite clear how they were implemented. They were obsessed with this 3 in one, and one in 3 ratio as far back as records went.