Boris Johnson dropped a reference to “onanism” from an election campaign speech after previews of the text drew criticism from the opposition.

On Tuesday night Johnson’s advisers released extracts from the speech the prime minister was due to give at an electric taxi factory in the West Midlands on Wednesday. In the texts given to journalists, Johnson likened Labour’s approach to spending, Brexit and Scottish independence to “self-obsession and onanism”.

But when Johnson delivered the speech the word onanism was left out. Asked about the omission by the Sun’s political editor, Tom Newton Dunn, Johnson tried to laugh it off.

He said: “All I can say is that a stray early draft seems to have somehow found its way into your otherwise peerless copy, by a process that I don’t pretend to understand, but I will make inquiries.”

Reports of the pre-briefed version of the speech led to a spike in Google searches for the arcane term for masturbation.

If Johnson had used the word it would not have been the first such public reference. Earlier this year the prime minister was widely criticised after he said that the Metropolitan police had “spaffed up the wall” resources on child abuse investigation. And in 2015 he referred to jihadist terrorists as “literally wankers, severe onanists”.

Diana Birkett, a London psychotherapist, said Johnson appeared to have an obsession with masturbation. “His tendency to slip into sexualised abusive language suggests a disturbing lack of maturity in one standing for the highest office.”

The toned down speech came after the Labour leader, Jeremy Corbyn, expressed disgust at the proposed wording. Talking to reporters in Glasgow Corbyn said the use of the word onanism was “ridiculous and actually quite offensive”.

He added: “If you want to say something, say it in clear, plain, language that everyone can understand. The clear, plain, language I would use is I want to live in a country of social justice, I want to live in a country that makes its decision for the future, on 12 December.”

Jonathan Ashworth, the shadow health secretary, described Johnson’s pre-briefed remarks as “pathetic”. Speaking to Sky News he said: “I don’t think my mum in Urmston would be impressed with that.”