I actually found that the best way, was to heat the part slightly. Does not matter how. Open flame works fast (just dont get close to the mineral sprits with it), otherwise a heatgun will work too. Don't get it to hot, you don't want to ignite the cosmoline, burn wood or melt plastic. Just warm it enough right until the cosomline gets runny. If it starts smoking, you probably got it a little to hot so let it cool a bit before you move on.
Then just use mineral sprits and a toothbrush. The mineral spirits will smoke slightly when first applied, to prevent this, I just dunk the whole part under the surface of the mineral spirits for a few seconds and shwish it around to remove most of the cosmo and let the part cool just a little, then just scrub the remaining cosmo with your toothbrush. Very little effort for scrubbing and the cosmo just comes right off. It helps to have a large shallow pan for longer parts like barrels and such. Otherwise, a 5 gallon bucket works for everything else.
I have tried hot boiling water before. Did not work near as well. Especially where the cosmo is packed into small places, such as firing pin holes, or gas ports. Thats when you need to just heat it up so the cosmo can just run out.
Make sure you re grease your parts with your favorite rust protectant after, otherwise you might get some rust.