Two things on that. 1) the difference in the actual energy required to accelerate the heavy wheel v the lighter wheel is very small. 2) a harder gear may drop you cadence but if speed is a constant then the power (and effort) doesn't change.
1. I never suggested it made a large difference, I was only saying that is the only difference it would make!
2. The idea was to keep power output the same, but increase the force your legs exert on the pedals. Even though the amount of work you're doing is the same, you are doing it in a different way, which will affect your legs differently. Increasing force and reducing cadence by using a harder gear is similar to cycling up a steep hill (as in no more gears left) with a lot
of extra weight on your bike. To have an appreciable effect, any added weight would have to be a reasonable % of total rider & bike weight. I think a harder gear is much better for building leg strength than a heavier bike. You can vary the resistance a lot more than by adding weight, you can do it on the flat, and you can always shift to an easier gear...
I hope you don't misunderstand - I am a firm believer in lighter+faster=heavier+slower, i.e. power output is what matters when training, and that people who load up their bikes are really wasting their time. Especially when they add like 2-3kg. But, if you are training specifically for leg strength then a 20kg bike is better than a 6kg bike (when doing hills). (Although I would choose the 6kg bike and put it in a harder gear, if that was my aim.)
EDIT: I'll just add that, personally, I think squats would be a better way to improve leg strength. When doing hills on the bike I think it is better to go up them in a sensible gear, as fast as you can. That way also enables you to maintain your threshold power for longer.