And if I use swallow or spit up will I lose the multiplies boost if yes?
Yes, Stockpile will give you a 2x Defense and SpD. Boost. If Swallow it Spit Up is used, you will go back to your normal Defense and Special Defense. They will be lowered 2 stages of 1 Stockpile was used. Source: I just tested it. https://replay.pokemonshowdown.com/gen8balancedhackmons-1183338980 Don't judge my horrible team.
Yes The Simple ability affects any and all stat changes to the user. If you have 2+ defences from one Stockpile and use Spit Up or Swallow, then your defences will be harshly lowered.