Your aim shouldn't be perfect security, but just security which is good enough that an attacker would have to spend more money on breaching your defences than the value of whatever they would gain from doing so.
Another way of looking at it is the through the analogy of the two hikers who see a tiger, and one of the hikers decides to change into some running shoes. "You can't outrun a tiger!" "I don't have to, I just have to outrun you".
In a sense, security improves one hack at a time, and as long as you are doing your due diligence and being more secure than your peers/competitors, you will be doing your bit towards improving the average security of the internet.