My advice would be to strip down the tank
Give everything a thorough clean and sterilize, replace all filter media with brand new ones, new substrate and then start a fish-in cycle with the cory (or a fishless cycle if you can bear to let the cory go or can temporarily rehome him).
I really have no explainations for what is happening and I think you've done everything possible to safeguard the fish but unfortunately it sounds like there's some toxin in the tank doing the damage that can't be pinpointed.
It's been such a long haul that I've forgotten if your tank was brand new or secondhand?
I know you're feeling defeated at the moment but please don't give up entirely, you clearly have a passion for fishkeeping and your child seems to enjoy them too. This is not a case of having to start all over again, you have gained so much knowledge whilst having this tank that you are not starting afresh, merely starting another tank.
If you need any advice on cleaning and restarting then let us know.
And finally, sorry I couldn't help solve this one.