It boils down to hassle factor divided by tax savings.
Hassle factor is the time and effort to make the transaction, track wash sale dates, then properly fill out your tax return with the trades.
Tax savings depends a lot on the rest of your return. Tax harvesting a capital loss could offset a capital gain, which would save you the amount of the loss times your capital gains rate. Tax harvesting a capital gain could offset ordinary income, which would save you the amount of your loss times your ordinary income tax rates, probably at the federal and state income tax level; it might also increase your ACA APTC.
You can also tax harvest capital gains, which is where you realize gains if you are in the 0% capital gains bracket. That gain does not get taxed and you can immediately rebuy and reset your basis at the new higher level. However, even though the gain may be free from federal capital gains taxes, it may decrease your ACA APTC and may increase your state taxes.