He admitted it himself, he wildly exaggerated to become known as a miracle worker, no exaggeration, no miracle worker, no best engineer.
As already pointed out, and correctly, by Maurice
upthread, that was a joke. Playful banter between two old friends, Kirk and Scotty.
It was also the advice he gave to Geordi in 'Relics' - and he was shocked Geordi wasn't regularly inflating his timetables to make himself look good.
It was also corroborated by all the times when he needed unrealistically less time than he reported to his superiors for completing a task.
If that was a joke, well, Scotty put the joke into praxis repeatedly.
As for 'best engineer' - it's a tie between Tucker and O'Brien, the most realistic engineers on the show.
Laforge and Torres are disqualified by their technobabble solutions - command of the laws of nature by technobabble would be nice, but it's not in the cards in the real world; as such, it's cheap.