As suggested in Solution found for WiFi clients disconnects getting rid of TKIP encryption worked for me. My Nexus 5X has an uptime above 200 hours, and Wi-Fi is behaving fine.
This is a workaround, and it broke the connectivity of one of my oldest devices, but way better than getting frustrated with my smartphone