If the situation described is accurate, then maybe
First, let's deal with the implicit assumption that sales tax is not payable on gifts. Whether that is true or not depends on the law in your jurisdiction.
For example, in australia there is no Goods and Services Tax (GST) payable on a gift because a gift is not a "supply" under the law. Technically, a value-added tax like the GST is not a sales tax but close enough.
However, exchanging a "gift" for something of value (airline points, for example) is not a gift.
Of course, Australian States and Territories levy Stamp Duty on the transfer of a vehicle's registration, and this is calculated on the sale price or the market price whichever is the greater. Also, technically, that's not a sales tax either.
If it's a tax avoidance scheme, then no and it's a crime
Assuming that there is no sales tax payable on a gift; if John and David entered into this arrangement (not a contract because of its illegal purpose) to avoid tax, then tax is payable and they are now criminals.
If the relevant tax authority learns what happened and decides to investigate, then John and David might have some explaining to do. If David can show that he has routinely given John large cash gifts on John's birthday, then they may convince the authority not to prosecute. If they can't, then they get to try to convince a judge.
It is not atypical for tax law to reverse the onus of proof: the government doesn't have to prove tax is payable, John and Dave have to prove it isn't.