Just to be clear, a program in .NET with enough work might get you around your particular problem allowing you to grab some TOC data but it won't really "solve" the bigger issue. Directly manipulating data in the calibre database as you would be doing from a .NET application is not exactly a supportable or recommended approach. Stuffing data into custom columns without using calibre's API to do so isn't something I would recommend doing but hey, its your database
The proper solution requires changes to calibre's plugin metadata merging logic and metadata download plugin api (which is all Python based), and then changes to the metadata download plugins to make use of the API changes.