What ever you devise is probably going to end up being based on brute strength - something the hogs can move and the coons can't. Spraying any predator scent that would discourage them would probably scare the hogs as well, though coyote scent might work. I had a couple pet coons when I was a kid. Their problem solving skills are amazing, and basically having thumbs, then can open or manipulate almost anything. My moms favorite coon, the one allowed in the house used to make a B line for the fridge, open it, and help himself. We put a lift bolt type hasp on the door. He watched us open the fridge a few times, then climbed on the counter, reached out, and manipulated the latch. We ended up putting a push clip thru the hasp that he wasn't strong enough to open. His enjoyment of playing tug of was with my sisters dolls, and climbing the curtains when he saw a bird out the window ended his inside days...
Larry