Do reinvested dividends lower my cost basis?
For all practical purposes, no.
Remember that dividends are the portion of the profits a company pays out to its investors (shareholders). Theoretically, the share price will drop by the amount of the dividend upon payment since that amount of cash has just been removed from the balance sheet.
Dividends then are investment returns in the form of a cash payment.
In contrast, when a company retains its earnings and foregoes paying dividends, the investment returns will presumably be in the form of an increasing share price (at least that's what its investors are counting on).
Dividend reinvesting does affect the cost basis of your holdings, but it shouldn't be seen as a kind of partial refund of your original purchase. If you invest $10,000 in a dividend paying stock that generates $300 in dividends after one year (a 3% yield), just because you reinvest that income doesn't mean that your cost basis has been reduced to $9700.
Reinvested dividends should be seen as a new purchase of stock.
An example: you purchase 1000 shares of XYZ for $25,000. Your cost basis is $25/share. Let's suppose the stock pays a quarterly dividend of $0.31/share (equating to a quarterly payout of $310).
Let's also assume that the stock rises by the time of the next dividend payout so that it's trading at $31/share when your dividends are reinvested. Your dividend payout is enough for you to acquire an 10 additional shares, purchased at $31/share.
Now that may not move the needle much, but there is a change to the cost basis of your entire position:
Reinvesting dividends is a powerful approach for compounding both total portfolio value and cash flow over the long term. Dividend reinvestment, combined with dividend growth and maintaining a portfolio of high quality companies, is a long term recipe for investment success.