One of my Shelties suffered from seizures from the time she was 9 months old, caused by a combination of vaccines and flea/tick meds. I worked with a holistic vet using diet and homeopathic supplements and by 4, her seizures stopped until she was 10, when they returned. At that point my vet thought a brain tumor was causing them, and we treated her with gabapentin which helped some. We lost her at 11.
I think you're on track eliminating the Nexguard. Recent research has shown that using it over time can cause neurological damage. There's a thread here I recently posted about new FDA warnings about that and other flea/tick meds. Some people have also had problems with the collars, so I'd be cautious about using those too. Maybe try something like Wondercide, which is all natural and comes in a spray and a spot on. I use it for one of my dogs who has had reactions to meds.
Unfortunately, there's no definitive diagnosis for epilepsy, and various things can cause it so it's basically a medical guessing game. I would definitely consult your vet...perhaps a preventative medication for Cody would be appropriate. Good luck, and please let us know how he does.