Dave,
Yes they did have dynamometers back then. However somehow at some point, it was determined in the industry that a 350cc machine would put out 2-3/4hp. (3-1/2hp for 500cc, 4hp for 600cc, and 6hp for 750cc.) And 2-3/4hp became synonymous with 350cc, even long after 350cc engines were putting out far more than that. As Ian says, the HP rating might have also been a taxation class early on, another reason to lie about the power

, not sure. Certainly it was so for cars, and there was a formula for calculating the taxable HP. This had little relation to the actual HP, and also accounted for many British cars having tiny bores and really long stroke to get a given displacement.
By 1922, Douglas were advertising 2-3/4hp machines as weighing less than 200lbs (175-199lbs depending on model) and so qualifying for a special 30 shilling tax. So for motorcycles anyway, it was based on weight and number of wheels but I do not know when this first took effect. A solo over 200lbs was taxed at £3, a sidecar or trailer cost more. This lightweight tax was extended to include machines up to 224lbs in 1931, still at 30s per annum. They stop mentioning taxes in catalog literature in 1932, though obviously they still applied.
Douglas seemed to hold on to the 2-3/4hp, 3-1/2hp, 4hp, and 6hp designations long after everyone else dropped it to denote displacement. Douglas finally dropped it with the introduction of the EW model in late 1925, though some of those were still called ‘the new 2-3/4hp’ in the press. I do not think Douglas much liked that, stressing it was a completely new design (by the new chief designer Cyril Pullen.) But by 1926 in the catalog they were completely switched over to 350, 500, 600cc displacement classes for all the models. Internal to the factory they still annotated some of the o.h.v. racing machine drawings as 3-1/2hp and 4hp class up to the 1927 season.
-Doug