I think this is an interesting idea, however I would recommend it be implemented slightly differently.
Allow one of the companion commands (when selecting a vendor) to sell all unequipped items from your companion to that vendor which that vendor is willing to purchase
Broken down...
Issue Order to Companion to "Sell to Vendor"
Items are automatically sold based on:
- Not currently equipped
- Vendor has enough currency
- Vendor buys those types of items
Allowing your companion to just 'go away and sell things' would break the local economy system built into Skyrim.