It is not terribly difficult if you know how to use lead/lag window functions in your database. And you have sufficient detail of both events and production schedules to yield the inner detail you are interested it.
However I still think the historian should be the main datasource. It would be more robust to have one gateway that act only as tag provider and historian driver. And a second gateway that run the Sepasoft module and the project.