e) Available loot depends on your crowns, specifically the crown difference between you and the attacker. Keep this in mind. One way to do this is, when you are skeptical of being attacked, is to choose higher crowned players in the hope that they won't find your resources too tempting if the available loot is too little. This has the downside of the possibility of your castle getting wiped out for a 100% loss if the defendant chooses to revenge you. Another way is to drop crowns artificially.
f) If there's a particular resource you care about then make those resource containers your most defended structure and move out your keep to a less defended place (not completely undefended). Hopefully attackers would not take the pain of getting to your most protected area once your keep is down, and you will get a nice peace treaty.
g) Try to keep gates upgrade more than walls because 1. many attackers go for the gates and 2.. rams automatically target them.
z) Please do not try to stay online using artificial means. It's not fun. You don't get imaginary in-game gold for staying on top of the leaderboards, let alone real gold. So no point in ruining your own fun and others' too. Also, if you get caught (which almost always happens), you'll lose your entire progress.