I think the raid can spawn inside your fences, but also has just as high likelihood to spawn outside of them. I would recommend checking out https://minecraft.wiki/w/Raid#Raid_wave_spawning for more.
In my opinion, 6 golems should do great and help out quite a bit! To help protect the villagers even more, wait for them to go into their houses to sleep, then put a block in front of the door (from the outside) so they can't exit at all and nothing can break down the door.
Good luck with the raid!