What is almost funny about this tactic is that Machiavelli notes the importance of specific circumstances throughout the chapter immediately before making generalized statements, but when it comes to actually judging the efficacy of fortresses, he refrains.
However, this does not mean that he does not come up with a general pronounce, it just means that this general pronouncement takes the form of a discussion of the importance of specific circumstances, and in this instance, the specific circumstances that matter are the degree to which a ruler is loved or tolerated by his or her subjects. Machiavelli ends the chapter by saying that fortresses may be useful or harmful, depending on the relationship between ruler and ruled, and furthermore, that fortresses or a lack of fortresses will not matter if a ruler is hated by the ruled. The way Machiavelli reaches this point is interesting because he is one the one choosing to formulate the question in this way.
In other words, Machiavelli is the one proposing a judgment regarding the efficacy of fortresses, but he only proposes this judgment in order to make his real point, which is to argue that this judgment is irrelevant if one does not secure the love or acceptance of the ruled. This is interesting because Machiavelli does not actually discuss public sentiment or affiliation in this chapter, even though this topic does take up much of the rest of the book in one form or another, including the chapter immediately preceding this one. This forces one to question, then, what the actual purpose of this chapter is, because it is certainly not concerned with advising princes about whether or not they should build fortresses.
Instead, it appears that this chapter is part of Machiavelli's larger goal, which seems to be the elevation of strategic thinking above and beyond traditional military concerns into the realm of a holistic realpolitik. Machiavelli is of course concerned with military strategy, but only as it fits within a larger strategy of successful governance based on practicality and actual human behavior rather than ideals and perceived tactical advantages. In this light, the final line of chapter twenty can be seen as a specific instance of Machiavelli's larger goal, because this line serves to performatively discard the original question of tactical efficacy (the usefulness of fortresses) with a larger, more fundamental question about politics and the origin of power (e.g. public sentiment).
Understanding that this is Machiavelli's real goal helps one understand how he might be comfortable with his gap in providing historical data and the ease with which he immediately contradicts himself, because these gaps and contradictions really only matter in the context of a discussion about the utility of specific practices, whereas Machiavelli is ultimately engaged in a discussion about what it takes to make these specific practices reasonable options in the first place. By using fortresses as his central metaphor, Machiavelli is able to make an argument about how to consider tactical options in the first place, because he demonstrates how these tactical options are only valid or useful in a political context conducive to their use. Put another way, these kinds of tactical options are subordinate to the larger question of rule, because they cannot be used to effectively influence the nature of that rule.
While changes in the way subjects are treated may have the effect of altering those subjects' perceptions of the ruler, and thus their willingness to follow his or her instructions, the construction of a fortress cannot substantially affect the good or ill will felt towards a ruler because this fortress does nothing for the population at large, except to generate a new space from which they might be excluded. This is why Machiavelli says that "therefore the best fortress is to be found in the love of the people, for although you may have fortresses they will not save you if you are hated by the people" (87). In other words, fortresses are only truly useful so long as the ruler has secured the good will of the ruled, because otherwise the fortress simply becomes a convenient place to trap the ruler once the people have risen up or sided with an enemy.