If I wanted to donate my own company stock, I would buy it in a separate transaction, hold it a year and donate it.
Most people don't understand the tax rules involved with ESPP. They don't understand that they pay ordinary income tax on the gain (so there is no realy savings to donating ESPP versus regularly purchased stock). They don't understand that it requires a longer holding period. Too many rules. Keep your life simple, sell it at each transaction period and if you want to hold that stock long term, just buy it in your regular brokerage account. Most people don't understand the rules and fortunately for them, they haven't been audited over them. Small fry stuff is why, but doesn't get rid of the liability for doing it wrong.
Make your life easy and just sell each time. You may not realize it, but you really don't gain anything by donating ESPP shares versus those just purchased regularly.