I heard many times that the British Empire had an official policy to attack anyone who was close to having a great flotilla able to challenge their sea dominance. I cannot find any sources about who declared this and when, how long it stood, and if it ever was an official policy.
I don't know of any such official policy. It would not have made much sense to deliberately and continuously start wars with other "great powers" of the time.
If you take, for example, the 1807 attack on Copenhagen, this was specifically motivated by reports that Napoleon was pressuring the Danes to use their fleet against the British or to give it to France. Napoleon had been engaging in war throughout Europe and had intended an invasion of England.
The British were not set on preemptive attack, they offered a more peaceful alternative that would place the Danish fleet out of Napoleon's reach:
Canning offered Denmark a treaty of alliance and mutual defence, with a convention signed for the return of the fleet after the war, the protection of 21 British warships and a subsidy for how many soldiers Denmark kept standing.
The next day Napoleon demanded Denmark prepare for war against Britain or face French invasion.
Everything points to the attack on Copenhagen being a reaction to a specific threat rather than a specific application of a general policy.