This method, it was called the "love-in" [1], was used by the Canadian government in 1995. It was illegal as hell as it was a blatant violation of election spending laws.
Some people say it was counterproductive but the proof is in the pudding I guess.
[1] https://beta.theglobeandmail.com/arts/books-and-media/book-r...