Musocity,
Yes, the general idea is what you are describing. There is also a company called Cognitone. In my view, they are significantly ahead of Rapid composer, and also have a way to working with Yamaha type styles.

However, for most people, the processes using 3rd party programs discussed in this thread would be a steep learning curve and only few would use it.

What I initially proposed is "in-house" module. BIAB had style functions (phrases following chords) way before EZkeys or Rapid composer were born. I believe with amazing synths available these days, MIDI phrase/style module should be given serious thought. Essentially EZkeys is a Midi phrase/loop module.