DJT attended the parties where he did not drink alcohol but most others did. This gave him a big advantage in learning things. He also seems to have quite a good memory.
I know from personal experience that drunk people say a lot of things they wouldn’t otherwise say. Drunk people are notably honest. Ha ha...
Trump has a good memory but he also displays the CEO habit of keeping journals and details of every encounter. I suspect that updating those is what he uses the nights that he doesn’t sleep for.