Suppose a hypothetical somebody won the lottery, but being such a magnanimous fellow, they decided to give away every penny. Would my hypothetical do-gooder still have to distribute money from post-tax funds, or is it possible to just tax each recipient instead and distribute the entire lump sum. I'm imagining a scenario where the funds were given in $1000 increments to as many people as possible (almost 1 million people with a $970k lump sum).
If the lottery pays you $970M, and then you make $1000 gifts to a bunch of people, yes, the initial lottery payment is taxable, but the $1000 gifts are below the gift tax threshold and thus not taxable.
However, many states allow you to choose how winnings are distributed. This is so that if a group of people wins, they can each receive and get taxed on their share, rather than having one person collect the winnings, get taxed, and distribute the winnings, which would be a second taxable event. Theoretically, you could walk into the lottery office with a winning ticket and a list of 970,000 people to whom you want the winnings distributed, and the lottery commission would make a $1000 payment - which would be taxable income - to each of those 'winners'.
In practice, your state lottery commission may balk at dividing up the winnings that broadly.
It depends how the money flows.
The money comes to you first, then you dole it out
If the corpus of the lottery winning is first paid to you (some taxes withheld), and then you dollop it out to various persons, you will owe taxes on the full amount. In the US and similar tax mechanisms,
For amounts paid to individuals, you have already paid taxes. You may have to also pay a gift tax when you give the gift.
for amounts you donate to registered nonprofits, you will avoid paying taxes on those amounts. However there is a cap. Take your AGI (substantially the amount of the corpus) and take 60% of it (formerly 50%), that is your cap for most public charities/nonprofits. Some nonprofits are 30% limit or 20% limit, such as your own private foundation. If you exceed the cap, you can "roll over" the extra amount to the next year, allowing you to take 60% (or whichever fraction) of that year's AGI. This only works for 5 years, not forever. Probably a lost cause with a massive lottery win.
The upshot is you'd be clobbered with taxes, good-n-plenty, paying normal taxes on at least 40% of the winning (if you exploited charity deductions to the max).
Or, you direct the lottery commission to pay it to others
In this case, before you receive the prize, you tell the lottery commission to divide the winning up to several persons. (Remember in the USA now, a corporation is a person).
Happens all the time with "lottery clubs", most states will split the winnings (and the taxes) for you to a sane number of recipients, but if the state does not do that, you form a corporate shell to do the splitting.*.
In that case, each of those persons will pay their own taxes on their share of the money.
If that person is a non-profit organization, they will not pay any taxes. Congratulations on your name on the stadium.
Taxwise, this is a much, much, much better way to do things.
One of those "persons" can a Private Foundation, such as the Bill & Melinda Gates Foundation, except with your name and you control it. Here's the deal though; you can't just pay yourself a million dollar salary as an employee of the Foundation. The salary must be competitive with what similar ranks of employee are getting, e.g. $75,000/year being a typical Executive Director salary. Setting up a Private Foundation is a complicated pain, and you will definitely need a legal team. You will also learn a new word: Inurement.
A much simpler version of a Private Foundation is a Donor Advised Fund, which you can set up in 20 minutes. It is a storage tank for charitably donated funds, in which you have the rights to direct how the money is invested and re-donated to charity. You can't inure using the DAF, even slightly, because they won't let you.
* Since many lottery winners do this, IRS doesn't seem to have a problem with it being formed after the win. (Remember, people don't win lotteries, tickets do. Tickets are bearer documents associated with no person until they are signed. If you are signing your lottery tickets right away, you have a very, very bad tax advisor.)