The important thing if you don't want to be invaded is taking the incentive away from the potential invader, by limiting their potential gains and by increasing security to make it harder for them to get to the goal. Potential attackers will likely pick a different, easier target with greater spoils instead of yours.
When you initially build it, it will just build the command platform. The rewards for invading a department with a single platform is very low, the invader wont get any volunteers, and the GMP reward is usually lower than the cost of their deployment. Also (with the exception of the base development platform) there will be no containers to steal on single platform department so I'd say it's unlikely people will invade at all. There's very little incentive for invading small FOBs.
The base development platform is where the majority of your online unprocessed materials are kept, so it is a common target for attackers. If you don't create the platform though, then people can't steal from it.
To further put people off, I'd recommend building security items like drones and mines, upgrading equipment to 5* that the security team can use (weapons and items marked in green), and putting the max number of people on the platform from the security menu on your iDroid.
Capping the skill level of the defence team in the security section will take away the incentive of an invader going in to steal the guards and it will mean you have less to lose if they decide to kill/extract a lot of staff. (If you set it to B for example the highest grade soldiers it will use from your security team will be B, and if a few die/get extracted it's not a big deal. You can set this at whatever level you're happy with).
I think if you just keep a level 1 command platform, maybe level 1 r&d and combat platforms, I don't think you'd get any invaders- and you don't really have much at risk even if they do.
Really I wouldn't worry, the reward for defences is really high. If they successfully invade you might lose a few staff, but successful defence I've gotten up to 700,000GMP, multiple S ranked volunteers, processed materials and plants. So I think you will likely receive a net gain for participating in FOBs. I've often won FOB defences when I was offline just because the invader got spotted and got nailed by the guards.
Also from the relationship menu try adding as many people from the random section as you can as some of them will hopefully add you back. people that support you have the option to defend your FOB and as the reward for a successful defence is so high, and defending is so easy- people likely will do that (and you'll have the option to defend theirs for a reward as well if they get attacked).
Another point is if you don't want to be invaded, don't invade other people. If you are detected invading it will inform the other person and give them an option to attack you back for a limited time (all their supporters have the option to attack you too), and usually they will.
If you want to opt out completely (including daily bonuses etc.) I've heard there are some TOS you can decline which will take you completely offline, but I've not tried that myself.
TL;DR: Don't worry, unless you build up your fob you don't have much at risk