In theory, your idea sounds good, and studies have looked into whether statins do have a beneficial effect on the incidence of gallstones. But, so far, the results are mixed and thus there is insufficient evidence to recommend statins for gallstone therapy.
But, let's say statins do work. Would they be useful for gallstone prophylaxis? About 15% of the US population has gallstones, and a majority of them are asymptomatic. Many of them will live their lives without any symptoms of gallstone disease. In this case, the risks of statin usage outweigh the potential benefits in preventing gallstone disease.