To protect your Harvester, protect it with high-level Towers. When you have a Wild Monster Attack, click "Prepare defenses" then bank all your resources. Then click "I'm ready now" (If you don't do this, the harvester will lose all the resources it produced).
You can use harvesters to delay attackers by using it a wall and towers.
To easily protect your harvester, you can protect it even without towers with booby traps and surrounding it like a square (you must still use towers, because it might fail. This is only effective to lower levels.).