Actually, I think the most sensible approach would have been a 30...37 mm Gatling with autonomous (battery) electrical power. This combination had been patented in 1893 (and shown a huge RoF soon after).
Such a 850 m/s MV Gatling with Minengeschoss (HEI) would have proved devastating at all ranges where the probability of hit was rather good.* There would have been very much firepower per gunner (gun layer, aimer), so training the gunner to be extremely proficient with reflex sight + tracer (tracer out to 3 km, ideally no two guns with overlapping angles would have the same colour unless spaced very much) would have been highly economical (training at low RoF).
I generally think that the light AAA of up to the 1950's had a weirdly low rate of fire. The quite improvised use of fighter guns (MG 151/20 and Mk 103) in a few mounts was an exception from the rule (even the quad 20 mm did not really have a high rate of fire). It was understood that machineguns would need a high RoF for AA (see quad Maxims, demands for high RoF with MG 42) and aircraft guns had a high RoF below 30 mm calibre, but light AAA tended to focus on heavier and faster projectiles rather than high RoF. The Kriegsmarine was an extreme case. Gatlings and water-cooled guns were easily able to cope with very high RoF, so one could have expected the navies to be on the high RoF side rather than the opposite!
*: Starshells and chasing spotter aircraft or airships away with heavy AAA could have been done with destroyer and light cruiser main guns and BB/BC secondary arty. CA could have used two dedicated starshell & heavy AAA 105 mm guns, akin to the flimsy actual USN cruiser AAA of the 30's.