Lots of great stuff here. It is a numbers game in many ways since I've been in interview processes where we turned down lots of people who go on to succeed in amazing ways at other companies.
I would be wary about recommending most people write cover letter templates. I can tell a templated letter most of the time. I'd recommend just writing a few sentences from the heart. Why you're great for them. Copy+Paste doesn't work, since each company is different and your background will connect in different ways. Keep it short and just ask to learn more.