If I were to sell my unit at some point, can the total amount I've paid toward the special assessment be deducted from, or otherwise partially offset, that capital gains taxes I would pay on any profit I make on the sale?
There are no capital gains taxes on owner occupied properties if you've lived there for 2 of the past 5 years and the gain is under $250k. (I'm 99% sure that's the specifics but don't hold me to it. I'm not a CPA).
However, if this were a rental property, your HOA fees would all be expenses, to be taken in the current tax year, not saved up and taken when you sell.