This is a living document to track the failure of wpa_supplicant.
"NetworkManager switches to the worse one of two APs all the time"
Thanks, so I've looked into this now, and it indeed some to be an issue with wpa_supplicant: In its decision logic whether to roam between APs it basically uses estimated bandwith as first priority (https://w1.fi/cgit/hostap/tree/wpa_supplicant/events.c#n1927), so if another AP can do ht40 while the current one only has ht20, it will switch to the other one while (pretty much) ignoring how bad the signal quality is. ref