When cracks behind kitchen countertops keep coming back no matter how many times you caulk them, the problem is movement. Either the wall, the countertop or both are moving due to things like, a poor installation job on the counter, or wall damage that leaves loose wallboard hanging in the breeze. This movement will quickly crack any caulking as the filler becomes rigid and the counter continues to move.
For surfaces like countertops, tiled walls or anywhere it's impossible to use screws or nails to stabilize movement like this, spray foam insulation can be injected behind the surfaces to hold things in place and prevent future cracking. When the foam meets the air it expands very quickly, as it cures it becomes rigid forming a firm support.
Spray insulation is an expanding urethane foam in an aerosol can, most labels will state for wide gaps, but as a general rule it expands to about 3 times when exposed to the atmosphere. The foam must make contact with a solid surface behind the counter to force it to expand out of the crack, build up and fill the gap. If the wall is completely hollow it will be harder to find a resting place inside so try to target the opposite wall or a stud to start.
Use a spray foam that requires acetone for clean-up, this information will be on the back of the can. Don't use water-based foams that call for soap and water to clean up, they are too soft and flexible when they cure and will not stop the crack from coming back.
Wear latex gloves and safety glasses when spraying the foam, it will stick to everything and may damage some surfaces, so mask any surrounding areas that may come in contact with it and have a rag and a can of acetone handy for cleaning up spills. Nail polish remover will work for clean-up also if you don't have acetone. Be careful when using these solvents, they will remove the finish on many surfaces including furniture, flooring, painted surfaces and possibly the dye in some fabrics.
Shake the foam can for one or two minutes and then attach the spray tube and trigger. To avoid unwanted spray, attach the tube to the trigger first and then thread the trigger onto the can. This foam expands quickly when it meets the air and unwanted spray will be difficult to remove, so start it outside and have a large cloth like an old towel handy to catch the overflow. The foam will continue to run after the trigger is released so wait until it stops to get a feel for how it will work and how fast you'll have to move when you start to fill the crack.
If you have any foam left in the can when you finish you can keep it and use it again if you clean the trigger and tube in a soaking bath of acetone to completely remove the foam residue. Also dribble a bit of acetone into the spout on the top of the can to soften the foam and keep it from clogging there. Keep the cleaned parts in a plastic bag taped to the can and reassemble them when you want to use it again.
Begin the repair by clearing all loose caulk and wall material from the crack and scraping it off the wall and counter. Run a putty knife through the crack several times to loosen things up and use a razor-blade scraper to clean off tile and hard countertops. Slide the blade under the old caulk to shave it off the hard surfaces and cut it away from the gap. On wallboard like drywall and plaster the razor will cut into the softer surface so instead use a putty knife to scrape the old caulk off there. Completely clean all surrounding surfaces for the best results when you re-caulk the counter later.
You'll need at least a quarter inch opening along the crack to allow for inserting the foam tube. If after the crack is cleared of all old material, the gap isn't wide enough, drill quarter inch holes about every six inches to allow for inserting the tube.
With the can thoroughly shaken, hold it upside down and push the end of the tube into the gap behind the counter. Squeeze the trigger for a couple of seconds or until the foam begins to expand out of the tube. When it has started flowing, release pressure on the trigger. The foam will continue to flow from the tube, so don't pull the end out of the gap until it stops.
Wait a few seconds to see if the foam starts to ooze out of the crack. If it doesn't, pull the trigger again for a few seconds or until the foam starts to overflow the crack. If foam doesn't start overflowing within a few seconds, push and/or pull the tube back and forth and apply the trigger until it does. The foam must make contact with a solid surface inside the wall so try to reposition the tube until it does.
Some spaces will require more foam than others, in areas where the space is minimal, the foam may expand immediately from the crack. If this happens, quickly release pressure on the trigger and pull the can along to fill the crack like you would with caulk. If you can't move along the crack, pull the tube free, hold a rag over the end and immediately insert it into a new spot. The goal is to produce a bead of foam to evenly fill the crack. If you need to, go back and catch any missed spots until the whole crack is overflowing with foam, too much is better than too little.
When the entire crack has been filled, let the foam cure for an hour or follow guidelines on the label for curing time. The foam will be rigid and smooth like Styrofoam when it has cured. When it's ready use a razor blade or other sharp knife to cut the excess foam away. As before you can use a razor-blade scraper to clean tile or hard countertops and a putty knife on wallboard.
Cut back all the protruding foam well below the level of the counter to insure a smooth finish when re-caulking. Caulk the crack with an acrylic latex or pure silicone caulk. In areas that are exposed to a lot of water the silicone is the better choice, check this link for caulking techniques and tips for choosing and applying caulk.