As far as I can tell, items such as armor and weapons are exclusively produced by workshops, and prosperity doesn't impact workshops directly.
However, there is a line in the workshop production code that's indirectly affected by prosperity, and it will control the maximum price an item can be that is produced from a workshop. When a workshop has done enough work to produce an item it randomly chooses an item from the particular category of the workshop type. The random item is chosen in such a way that more expensive items are less likely to be selected. So for instance, if heavy armor has been produced by a smithy it will choose a random heavy armor of the correct culture. This part is fine.
It then checks to see if the item's price is greater than the amount of gold a town has on hand, and will not produce the item if its price is higher than the total gold in the town. A town roughly carries an amount of gold equal to (7 x Prosperity). So as a rule of thumb, a town will not produce an item that is more expensive than 7 14 times its prosperity value*. That's why most of the top gear never appears in a town, because even if a town has 10000 prosperity it can only produce items < 70k 140k in value (roughly)*.
*Edit: The items also have a 52% trade penalty applied to the base price before being compared to the town's gold, so it's more accurate to say that items more expensive than ~14x the prosperity value of a town will not show up.