Here's a classic example of the shear out of cast iron in a product I designed many years ago. I don't remember the specifics at what it sheared at. The 1:1 times of thread engagement was not enough from the original design for cast iron vs steel. This was a 1.125-7 UNC thread. It sheared out at about 60,000 pounds of force. Design strength was at 55,000 lbs. too close for comfort. The sample stud shown in the picture was not used for the test, one similar with no undercut was used.
When designing a thread engagement, you have to take in account the chamfer at each end of a thread as being one less full thread of engagement, regardless. Next, you have to determine which is the weaker material, in this case, the OP says the cast iron is what the steel fastener is going into. That says cast iron is the weaker member, the steel screw is the stronger member. That means the thread will fail in shear in the cast iron long before the steel thread will fail. Also the failure will happen at the shear line of the cast iron, at the actual OD of the external screw thread.
Now, how many threads per inch should you use in cast iron? Cast iron does not like fine threads, period! What's considered fine threads? Anything finer than 14 threads per inch or it's metric equivalent. i still design in the Imperial Inch System. Sorry. The problem with cutting fine threads in cast iron is getting a good thread that is not torn, jagged, etc. Getting back to the subject. Most threads I design in cast iron are bigger than 2" in diameter, many up in the 8-16" in diameter.
The number threads or what I call "wraps" a thread makes in an engagement is what determines the holding strength of a thread. It don't manner the T.P.I. it's the number of wraps of thread engagement you have. Each wrap, contains an section area of material. This area is generally defined as the PD, if the materials are similar, times Pi, times the number of wraps, divided by two. Oh, don't forget to reduce the number of wraps by two for lead in chamfers and such. The result is the area of engagement. Take this area times the shear strength of the material involved. This will give you a "ball park" strength of what the thread will handle load wise. There's many other formulas out there that will get much finer results, I find this to work pretty close for the work I do. I work with lots of special threads, too. Ken