No analogy is perfect. One can point to all sorts of differences between Mao and Trump of course. When people say history repeats itself, there is some truth in it, even though the details are never exactly the same. One can gain certain insights by discerning a similar pattern despite the different details. This is how we can learn from history.