How crazy of a booby trap do you want? If you want to go the illegal route, you can put the trash can on top of a grenade with the pin pulled. When the dog knocks the can over... sayonara dog. Or you can use bungee cords to hold the lids on. That coupled with a small two foot high wall made out of a 2x4 staked into the ground to keep the cans upright. That way you can slide/ roll the cans out from one end, but keep them from being knocked over.
Two or three grocery bags the plastic kind - with about 10 soda cans inside. Lay them around the trash can for a while( dogs do not like the sound they make when stepped on) after a week or so they will get the hint - then u can remove the bags - problem should be solved- learned from experience.