Short answer: I recommend looking at the source code for Bronze and Slouching Towards Bedlam, which I consider very good examples of code organization.
The main tool I7 gives you for structuring your code is headings: chapters, sections, all that.
Everyone uses those headings differently, but I recommend looking at the source for some published Inform 7 works to see how their authors did it. A few of these were published by the creators of I7, deliberately intended as examples for new authors: Bronze by Emily Short and The Reliques of Tolti-Aph by Graham Nelson are the largest of them, and show nicely how Emily and Graham like to structure their work.
Apart from the worked examples, Counterfeit Monkey by Emily Short is an absolutely gargantuan piece of I7, and is also open source, but sadly does not have the nicely-formatted website to browse. My own style is heavily influenced by hers, aiming to make the source code as readable as possible, and you can see it at work in Scroll Thief.
For a radically different style, though, Andrew Plotkin and Victor Gijsbers tend to write I7 in a much more “traditional” way (i.e. a way more like you’d code in C or Python or what have you). For example, they tend to name their constants and variables to be clear and concise about what they do, rather than to read fluently in text. And on an organizational level, they both prefer to break large sections of code out into separate extensions, instead of doing everything in one enormous file with headings. Some examples: Hoist Sail for the Heliopause and Home by Andrew Plotkin, Kerkerkruip by Victor Gijsbers et al. (Heliopause doesn’t use the break-into-extensions technique, but Kerkerkruip does.)
Other good examples (where by “good” I mean “influenced my particular style of code organization”) include Blue Lacuna by Aaron Reed and Slouching Towards Bedlam by Star C. Foster and Daniel Ravipinto. The last of these is a great example of a relatively small game (some of the others I’ve recommended here are enormous) with well-structured and well-laid-out code. If you want to look at a more diverse selection, IFDB has a tag for games with I7 source available.
And finally, if you want to see how a whole bunch of different authors structured the same project, Cragne Manor is an I7 work where each room was created by a different author. You can browse the examples and see how each of those authors decided to structure “a single room, sometimes with a puzzle in it”. (One note is that you’ll notice a lot of weird names in the code; that’s because we all had to keep our rooms from interfering with each other, which means putting our names into every item and phrase. You generally don’t need to do that in any other type of project.)