As found on the wiki, it would seem that the ideal amount to have in your coffers is in fact 500,000gp. This is because on any given day a maximum of 10% of the gold stored in a coffer is taken out, which caps at 50,000gp regardless of if you had even 5,000,000gp stored.
After the completion of the quest Royal Trouble, which I'll assume you've completed due to the fact that you can store 7.5m, you can instead optimally store 750,000gp in a coffer.
The 3.2 million gp you are storing in your coffer is therefore more than enough, and can allow for resources to be gained at the maximum rate for approximately 33 days (leaving you with 725k left).
This code will allow you to calculate the number of days you can leave your coffers for while still receiving the full resources. to change the starting amount, just change the line starting
int cofferStorage = to have your stored gp, and
bool RoyalTrouble = to be true if you have completed the quest, or false if not. this is based on the coffers values, given that Royal Trouble is completed
Additionally the approval rating works multiplicatively, so if you have 80% approval rating and 75,000 is taken out of your coffer, only 60,000 will be used for resources, the other 15,000 will be lost entirely.