Use light perimeter to prevent monsters from spawning inside your base. Control raid trigger conditions. Control raids per biome so that some biomes can be more forgiving than others. Set min number of players that must be online for raids to trigger.