Safest option to store your coins long term is a hardware wallet (like the Ledger Nano S). You can then keep a small part of your coins on the exchange for trading if needed
There are some coins then that are not supported by hardware wallets yet (like IOTA,Monero ,Lisk,etc...). For them, you need one wallet for each coin and it can be tricky (for example IOTA wallet is still not really stable). Other option is to keep them on the exchanges but is not 100% safe since they can be hacked
I agree that keeping coins on the exchange is very unsafe. Crypto exchanges very often hack and steal coins. Coins must be on the stock exchange only for the period of time necessary to complete the transaction. After selling or buying a coin, you need to transfer it to your wallet.