Having Bernstorff have a greater influence on politics would probably be just the thing that could have made this union a reality. He seems to have been quite opposed to the constant warfare between Denmark and Sweden, and his reforms would make the two countries more alike in internal affairs.
Let's say Bernstorff lives a few more years. That could prevent 'Slaget på Reden' in 1801, which might put Denmark on course for an alliance with Britain later.
Such a success might also make Frederick see more value in having competent people assisting him in his rule, reducing his absolutist streak.
Probably of more immediate value would be to have the dowager queen Juliane Marie die right after having disposed of Strueense; that might leave the reins to Bernstorff without the ever present opposition at court.
Yeah, there are a lot things that have to fall in just the right order, with a king ready to seize the opportunity, but it's probably not completely impossible.
The total population of the three kingdoms would be a bit less than 5 million, which is about half the population of Prussia, a quarter of Great Britain's, or a sixth of France's. Not enough to really throw their weight around, but probably enough to be taken seriously as well. A perfect size for creating stability in Northern Europe.
If the Brits are willing to have the one nation rule both sides of the entry to the Baltic but then the Ottomans did just that...
If the countries stick together, and the Norwegians and Swedes don't feel the need to run off to America, the combined population of the three countries would also be a bit higher than it is today. Had the population of Sweden grown at the same speed as that of Denmark between 1800 and now, the population would be a whole 5 million people greater. Maybe that's not realistic, but Scandinavia would probably be more populous, like a bigger version of the Netherlands.
It might be even bigger; read during researching the If you wait you may become King of Sweden that total Scandinavian migration to the USA amounted to about a million; in which case you may if avoiding the famine of Norway during 1807-15 which you will ITTL advance the population increase by say a decade following 1815; by and large!
Of course losing Holstein will be a loss but OTL the 1864 loss was a benefit to Danish industrialization so would probably be here too.