My opinion is that Trump is NOT intellectually fit. Those lines you cited were simple memorizations that he did which is why they were just thrown into his rant (good characterization!) but not in context.
Have you ever spent any time with people who are suffering from dementia? They talk exactly like Trump. It’s frightening.