What Gerrold's describing there is hard science fiction, and its something that Trek (for better or worse) never wanted to be. The question of how to build a starship and making each individual deck make sense is something that we spent quite a lot of time arguing about back when we were recreating the Ent-D on Stage 9. At the end of the day, you just can't make sense of every detail on the ship if you look at it from a "realistic point of view" like hard scifi does, you have to assume that some sort of futuristic tech which we couldn't even understand takes care of stuff. Waste disposal, power management, air vents, and a lot of other details are usually never addressed in canon, and even "soft-canon" references such as the Technical Manual are understandably vague. No matter how much the authors cared, these resources were made on a schedule and with the limited resources of their time (I bet both Franz Joseph and Rick Sternbach would have loved to sketch out rooms or concepts in 3D when trying to write about these ships), so properly understanding every nook and cranny and translating that into 2D back then would've been impossible (heck, it's a herculean task even today).