To remove salt, soak about 20 hours in fresh cold water, changing water 4 to 5 times.
Several hours before you plan to cook the cod, start the sauce (for which they take over 5 hours in Spain, but you may need less).
In large skillet with cover, or Dutch oven, heat oil, 1/4 cup lard, bacon, and ham. When mixture bubbles, add onion, whole garlic cloves, and parsley. Cover, turn down heat as low as possible and cook for 3 hours, or until onion is very soft but not at all burned. Add boiling water and continue simmering for 2 hours longer, or until onions are completely fallen apart. Add more boiling water as necessary to keep from sticking. Add pimientos, tomatoes, and egg yolks mashed with bread crumbs and mixed to a fine paste with a little cold water. Simmer for a few minutes longer.
Put everything through a sieve, food mill, or blender so you have a smooth sauce. Add salt and pepper to taste, and if you want to be authentic, a dash of cayenne.
Meanwhile, when cod has soaked for 20 hours, dry it thoroughly with paper towels. Remove any scales, being careful not to damage the skin (which adds a smooth, gelatinous quality to the finished dish's sauce). In large saucepan, combine cod and unsalted cold water to cover; bring to a boil. As soon as water starts to boil, take out the pieces of cod; carefully remove bones.
Grease a heatproof casserole with lard or bacon fat. In it, arrange a layer of cod; pour sauce over; repeat until all the cod and sauce are used up. Sauce should cover the fish, not drown it. Cook slowly until fish is done, about 20 minutes.
During cooking, shake the casserole often so the sauce runs to the bottom. Also, with a wide pancake turner or spatula, losen the bottom layer of fish often to keep it from sticking, being careful not to break the pieces.
Taste from time to time, and add salt and pepper if necessary; or a pinch of sugar if the cod is make the sauce too salty.
Finished dish should be savory, neither too salty, too peppery, not too sweet, and of a good red color. Makes 6 servings.