I am afraid that that is merely impossible with the present budget Wifi if with 802.11 Wifi at all. To have an AP coping with all these factors it needs to scan and test the medium continuously for all these variable and be able to change channel 'on the fly' without interrupting the data flow to clients that are communicating. So AP can decide to set certain channel and then suddenly neighbor goes on Netflix and his Wifi start working as a heavily interference source. If these are idle (no data transport) they are hardly 'visible' for AP. So what was good once, can be poor just minutes later. Quality of the signal (S/N ratio) and thus connection rate.
But which client? One client can have a good signal where another gets poor and would be better off in another channel. This can differ 'per channel' but AP needs to get this info from the client. Signal strength at the receiving device. The problems with Wifi enviroments is that to find the best channel for the AP to work on depends on several variables:
Expecting relative cheap Wifi devices like Mikrotik's indoor units, Ubiquity, TP-Link and name many other economic wifi routers for domestic use is the same as asking Formula 1 performances from a Hyundai I10 car.