In my later 4k synth I had a basic stack scheme you showed in your first diagram, but one crucial addition was a mixer device that would mix the output of two stacks together. This made it MUCH more flexible, but again, this was in a 4k synth and there are much smarter ways to do this for a full-sized thing

. One idea that's used in Reason is the Spider Audio Merger/Splitter; it's literally exactly what it sounds like (the highlighted device in this pic):

There's also a variant in Reason for CV signals. In more standard DAW's, however, you often have the concept of sends/busses. A bus is basically a signal path and a send is a routing assignment to direct signal to that path. I would make a better screenshot for you in Reaper if I had it installed on this machine, but since I don't, here's an old screenshot:

here each mixer channel you see represents either an original audio signal or a bus (in Reaper both are just tracks). There's a small I/O box on each as you can see; the ones with "snd" highlighted means they have output going to a bus other than the "master" which is their usual output (which either goes to the actual master or their parent track; another feature in Reaper), and the ones with "rcv" means that they're receiving one or more input signals from another track.
Implementation-wise, this would be pretty straightforward; each signal or bus could just be a Channel (or Track in Reaper terms) object with a Parent field. If the Parent is null, the output goes to the main mixing bus; else the main output goes to the channel's parent (this sort of routing is something I often use for drums so you would have volume/fx control per percussion sound and another volume/fx control for the ensemble). There would also be a global list of Send objects, where a Send object could simply contain two Channel references (representing the source and destination respectively) and the volume for this send. So, each sample/synth buffer iteration all of the Channels would take input from all of the other Channels that are sending them input, mix them together, and produce their own output. To reduce inter-Channel latency, a simple pass could be performed whenever routing is changed to figure out the order in which devices should be calculated. This could be a recursive algorithm where you simply visit each bus sending output to the main bus, and for each of these you then visit the Channels they're receiving input from. The visitation order is then the reverse of the order the machines should be calculated in (note that if a device has already been visited, it is ignored upon revisitation). If you have loops in the send/receive routing, this would still incur some latency, but that's a rare special case that should be avoided by the user anyways.
As far as the patches goes; I would recommend each Channel to simply have a linear list of devices to work from, just as you showed in your first diagram. Then, you could serialize the devices and their parameters as patches per channel; this is also how it's done in Reaper and how it could work in your system. Not exactly the same functionality as you mentioned, but it could be a nice alternative

This post kinda turned into a rant about how my next synth will work, haha

Man, I love this stuff... anyways, hope my blabbering helps; please let me know if some of this doesn't make sense
