I could build a steel box and fill it with the heads, then put a steel plate on top of that, so I can still use my heat powered fan on it as well?
Thermal mass is almost always best implemented by using water.
Cast iron has only 460 J/kgK heat capacity whereas water has 4190 J/kgK. That's nine times bigger.
Not only is the heat capacity of water nine times bigger than cast iron, but also water production never releases any carbon dioxide as the water is already present on this planet (well theoretically desalinating seawater might use some energy but in most places desalination is unnecessary), whereas steelmaking releases carbon due to the fact that iron is reduced using coal. In the future, steelmaking will use hydrogen, but today, if you start hoarding cast iron, you are preventing other far more sensible uses of iron from using recycled iron and they have to use new iron that releases carbon dioxide during production. Also, if you use cast iron, you have to haul heavy solid material. If you use water, you only have to haul very lightweight empty water containers, and you can fill them with water at your home.
So, doesn't make any sense. Use water instead.
Possible , the density of iron/steel permits storage of more heat in a specific volume than water. However, cleaning engine heads will be difficult. They are likely to smell bad whenever heated. And modern cast iron is engineered to be thin so there is not as much mass as it may appear; but you can get the same efficiency with something like steel rebar - it is clean and can be stacked neatly, is readily available. Cost to be determined based on what a junk yard may charge for heads as the have a reuse value. Water, of course is cheap and versatile; I use a few 5 gallon carbouys in my shed to store heat