@OP You're correct except for one detail: you wouldn't need to make a new esp. When you load up skyrim and mod B, just set mod B as the active file and the changes will be saved to mod B.
In case you're still confused, you'd use the getgoldamount function I linked if you're progressing the quest via script, or the GetGold condition function if you're progressing it via the quest page.
You should read this: http://imperial-library.info/content/final-report-trebonius If you aren't concerned with being "lore-friendly" then my only question is: What happens after you defeat alduin and come back to the dwarven city?
Are you asking for how to have the quest npc know if the player has enough gold or how to have a message displayed to the player when they have enough? Cause the latter seems redundant. As for the former, use the getgoldamount function (http://www.creationkit.com/GetGoldAmount_-_Actor) as a condition for that part of the quest.
That is fascinating lore, albeit confusing. I would love to see a mod based around this and, if I can make a suggestion, perhaps a piece of the mod could be finding the last dwarf and helping him regain his memory.
Theres a faction called JobMerchantFaction which has options for setting up a vendor. I haven't played around with this or anything, but it's what I found at first glance.
In your object window, under items > outfit, you can right click on the right pane of the objects window and create a new outfit that can consist of any armor you want (drag and drop armor peices into the outfit window) and can then be equipped to any npc.
Searched high and low and all I found is removeallitems: http://www.creationkit.com/RemoveAllItems_-_ObjectReference It's rather extreme, but you could un-equip and remove everything to a remote container and either return it later or have the player retrieve it.