Use small natural stone archways to trap it, there are a few on Scorched Earth map, as the natural stone blocks the rocks it throws and won't take dmg and prevents it from making other types of attacks. Now you have a nice and still Elemental to shoot at in safety. Pillars work well but it can change aggro and you'll have to readjust your aim.
To tame these turret soakers I’d recommend getting four metal gates 5 pillars 3 ceilings and 3 walls. For the trap and the pillars are supposed to prevent the golems rocks from hitting the cannon. AIM FOR THE HEAD