I think it should be a function feature on any ship. I don't see any reason for nerfing the range of a 127mm as a main battery with 8,4km on the Chester to 3,5km on the wyoming that have it as a secondary battery, the same gun is used as a secondary gun on almost all US BB.
I proposes the range of the 127mm gun should be incressed to 8,5km for the wyoming and 12km Montana, simllare for the Cruisers that uses the same gun.
As for potential damage for a secondary the properties is not specified. therefore, i will use the data from the Chester and the Fletcher:
Rate of fire: 7,5 (12)rounds per min
potential damage: 2100 AP
For the Wyoming that is 47 250 dmg/min per side of the ship, that is makes out 24% of the damage of the main battery.
Sec: 3x7,5x2100= 47 250 dmg/min
Main: 6x2x2x8300= 199 200 dmg/min
For the Montana that is 252 000 dmg/min per side of the ship, that is makes out 78% of the damage of the main battery.
Sec: 5x2x12x2100=252 000 dmg/min
Main: 4x3x2x13500=324 000 dmg/min
I think for the Montana the range is even more of a problems when 78% extra damage is not use do to short range.