Denmark would do very well not to get drawn into the Napoleonic Wars. It tried to stay neutral for much of the era, and what happened was it had Napoleon invade Jutland and the UK shell Copenhagen and steal their fleet because the naval battles made neutral navies irresistible targets for countries who needed a quick boost. France lost its navy at Trafalgar in 1805, so it simply marched into a neutral country (Denmark) to take their navy and start again, the UK felt it had to respond and got to the fleet first. In Europe during the Napoleonic Wars there really was no neutral. Everyone got invaded or had to invade someone at some point.
However, as for survivability...it's possible, but the weight of time is against them. They were declining and Sweden wanted any chance to steal Norway from Denmark. It would essentially have to pursue a course of action which forced Sweden to constantly be its ally so Sweden had no due cause to ask for Norway. Even then I get the feeling that at some point it would come down to a fight for control.