Have a quest script that starts once you first get the mine going. Have it track your upgrade progress for the mine, and use a timer to add whatever to the appropriate chests, depending on how upgraded the mine is. If you use the respawn method, if you miss a trip to collect your earnings, when the container respawns, that earnings that are currently there will be gone, and only the most recent earnings will be present. With the script just adding whatever to the chests, earnings will be cumulative. Which I think is what you want anyway.
Alright, that sounds like a really good idea. I'm not experienced at scripting yet, but I plan to be sooner than later, so with that in mind try to bear with me as I try to work my way through getting this script running.
A question I have is, if there are chests that are disabled, and the script tries to add earnings to those chests, will the contents that the script tried to add to them be there when they become enabled? Or will the script just not put the contents into them because they are disabled? Or will I have to use a getif disabled command?
I also would like to know how to set a timer, because that is something I don't know much at all about, and as far as I've seen is one of the more complicated scripting functions.
EDIT---
Also, if I can actually figure out how to set timers on scripts correctly, I could add some realism to this mod by creating a waiting period between the purchase of a construction order and the enabling of the corresponding addition to the house, therefor adding a sort of simulated construction time for each addition, rather than the addition magically appearing there the second you purchase it. One of my main aims for this mod is to replicate the town creation system Bethesda set up when you build Raven Rock in the Bloodmoon expansion for Morrowind, except in a more concentrated household setting.