If he understood the context of the poem (a lack of sensitivity to the three wars the British fought to suppress Burmese independence) then he would've never recited the poem. But he is a 'well-trained idiot' - he's had an English classical education, so he knows Kipling, but he doesn't understand what it actually _means_ ('oh yeah, I totally was going to shag a girl when we were fighting in Burma') or how it would come across to someone who wasn't also from a classically trained English background.
So I think he is a clueless bumbling idiot. He, and Jacobs Rees-Moggs, are the British equivalent of a Texan politician who wears a cowboy hat and talks about their guns all the time.
The story is available here - https://www.theguardian.com/politics/2017/sep/30/boris-johns...