I'm not pushing either for or against autosell. But if the autosell feature is implemented, it can be fully accomplished without any extra UI. To switch on autosell, the user sells 100 units when he has 9 or less units in his inventory. This matches the existing behavior of players - players already do this precisely when they want autosell on. It is triggered voluntarily, and can be avoided voluntarily. Autosell is turned off by buying any quantity of that resource. This handles all cases without any extra effort on the part of the player.
The user doesn't have to worry about managing autosell states. Whenever the user wants autosell on, it'll already be on. When he wants it off, it'll be off without any extra clicks.
Mainly, I thought about this issue after seeing pbhead trying to sell his food into debt: https://youtu.be/y5vFVaqGsaQ?t=327