In theory, yes. But the thickness of the magnet coating and its irregularities reduce the adhesive force of a magnet stack compared to a single magnet of the same height.

The decrease in adhesive force due to coating irregularities is, however, minimal if the size of the magnet is large.

It is usually considered that the power of 2 stacked magnets is 30% higher than the one of a single magnet. This increase in power is not linear, it no longer changes when the height of the stack exceeds half the diameter of the magnets.

To summarise, with magnets, 1+1 does not quite make 2 !