Trump is not stupid, he is narcissistic.  A stupid person is working with what limited abilities they were born with. A narcissistic  person takes what they are born with and then turn themselves into the center of the universe where they alone have all the answers and  do no wrong. They truly believe the word is out to get them and they have to protect themselves; in this instance,  the tweet reprisals.