I wouldn't try to over complicate things. A 5KW DC solar controller does not need to be included in every product. The system could allow for DC power input in a manner controlled by software that could offset power delivery from the AC stage.
Individual panel optimizers can already tune output voltage and current, it is just a matter of telling them what you want. If you are really clever you can set operational parameters to cap power consumption based on available solar power, but that's all for later.