I have experienced just this problem with the Mac Mini's thunderbolt ports and external hard drives. Even using cables that support the USB-C connection (rather than adapters), the thunderbolts ports intermittently lose the connections. Hooking my drives to the USB-C ports stabilizes the connection, but there are only two and the rear ports are unusable.