>The stocks get a one-time relief from capital gains as it moves to the heir.
Yes, that estate/inheritance taxes need reworking. This is not a wealth tax as discussed, this is an estate/inheritance tax which is different.
>This gives opportunity for the heirs (or the estate) to sell the stocks to pay back the loan. That is the loophole.
The loans are made whole by the estate, no one is taxed on proceeds from a loan, nor should they be.