And can I generate keys securely first and then use a closed-source wallet?
Your keys and seed are the most important. You need to keep them as safe as you can at all times. That includes the creation and subsequent use of them. A closed-source wallet should only be an option if there is nothing else available to you. Luckily, that's not the case with bitcoin, ether, and several other altcoins.
If you create your seed in offline mode or with the help of a thoroughly-tested hardware wallet and then import the same seed into a closed-source software wallet, you are basically undoing the time you spent generating your seed safely. You can never know what that closed-source wallet does with the seeds entered into it. Maybe they copy them and store them somewhere because they are malicious. Maybe they are using outdated and less secure and vulnerable libraries, which can cause bugs and leakage of private data. Maybe the entire point of that software is for the developers to eventually steal as much as they can from their users and live out the rest of their lives in some exotic location somewhere.
All of this has happened in the past in one form or the other. That's why it's important to try and protect yourself as best as you can.