If I had a pokemon with fully boosted Def & Spdef, and it used stockpile, would swallow recover HP?
Yes, you will. You just don't gain Defenses.
Source: Tested on PO with PB-10.