The longest I have ever gone is 7 days but from what I have observed, for most long distance "thru" hikes like the PCT you are usually only actually "gone" for 3-5 days meaning that you are never very far from an opportunity to get what you need if you want it badly enough. What you need when may vary a fair amount on the really long trails.
Usually the thing I wish I had is some essential that I thought I had packed but didn't...We did a weight shake down the night before one trip and decided to bring one full medium gas canister between 3 of us only to discover once it was too late that it had somehow got swapped out for a mostly used small canister!!! Fortunately some nice overnighters gave us their spare canister so the specter of evil looks over cold dinners was avoided.
The bigger problem seems to be that people bring along a bunch of stuff they don't really need. Food, cooking gizmos, toolage, multiple clothing changes and massive first aid kits are common areas of excess.
Two extra things on the heavier side I would consider bringing depending on the hike are an umbrella (for sun and rain) and a light weight camp chair of some sort. Depending on the conditions and terrain they can really improve the quality of your existence.
Rarely have something I wish I had brought, unless it's something I forgot. Examples: hiking the AT through the Smokys one November, I realized my gloves had fallen out of my pocket (found them on the floor when I got back home). Took a little individual coffee grinder on another trip, and forgot the bottom "collector", which also held the crank! Smashing up coffee beans in a baggie between two rocks did work, sort of. 😄
It's usually the other way around. Even when I think I've trimmed my gear to just the essentials, it seems I often find something I thought I'd need but never used. After all this time, I still seem to pack my fears.