So I understand your confusion. There are several things happening here that make this hard to understand and the "marketing" data that passes as a user manual these days does not make this easier.
First of all, the available f-stops on your camera change as you change the zoom position. At the wide angle zoom position, you can adjust the f-stop to the following positions : f3.5, f4.0, f4.5, f5.0, f5.6, f5.9,f6.4, f7.1, f8.0
As you zoom in, the minimum f-stop of your lens changes and you lose some of those values. This is driven by simple lens physics - you can't changes that. So when you get to maximum zoom, your only f-stop options are f5.9. f6.4, f7.1, f8.0.
What is confusing when you say this "I don't see how this could be a hardware limitation, because zoom and aperture systems are controlled separately inside the lens" is that you don't realize that changing the zoom changes the largest possoible lens opening ( lowest f-stop number). Longer zoom = smaller internal aperture. Simple optics.
Nothing CHDK can do will change that - it's defined by the physical glass components of the lens.
As far as CHDK extending the max (smallest) f-stop to f16. well, that's a fantasy too. CHDK will TRY to set that value but nothing says the camera can actually do that. Sorry - sort of like finding out there is no Santa Claus, right ? On some cameras it has been reported that CHDK can achieve one additional f-stop beyond the Canon range - but it is also reported that the resulting images look terrible.
reference :
http://gdlp01.c-wss.com/gds/6/0300012156/01/pssx170is-cu-en.pdf