That's right, security should come first. Also, you need to minimize the risks as much as possible, then you will not be able to lose everything.
I know only one way to minimize risks when trading, it is to work only with large exchanges, and everything else depends on luck.
why mate ? is it because large exchange have a tough security and you think you can avoid hacks with that ? well thats a reasonable piece of advice .
when your secure your already minimizing the risk along with that but minimal risk does not meant that you will now not loose any . theres still a risk , only small and you can also loose small but thats better than loosing big .