There are a lot of old folk remedies out there that are just crazy. Not saying that one is, but I'd take it with a grain of salt. Our pigs have never had any spots in their livers. It may have been parasites or disease causing them, but I don't think spots in the liver are something you
should worry about until you have a pig with them. Lye can be very caustic, and could burn out their esophagus if you're not careful.
There was a practice the
Native Americans used where they added some lye (
wood ashes) to corn to make nixtamal - prevented thiamine deficiency diseases by unlocking some nutrients in the corn. But I think they either added very little or rinsed it off before eating the corn. Southerners learned this practice but called the end product "hominy" - which USED to be corn boiled with some lye to remove the outer hull and unlock the nutrients.