It is mind boggling to me to try to euhm, visualise (no pun intended) to design a pcb this way. I do not have much experience with Python and never wrote a script in KiCad…
I wanted to advise to take a look at the “studio clock” example, but you already found that.
So I searched this forum a bit for more info:
https://forum.kicad.info/search?q=pcbnew%20scripting%20tutorial
And I found:
And this points directly to some tutorials on:
https://kicad.mmccoo.com/kicad-scripting-table-of-contents/