Samsung isn't Foxconn. I would argue that Samsung did not steal tech from Apple, but probably Apple paid for a lot of tech from Samsung.
What Samsung did steal from Apple are a lot of design cues. While I don't agree with being able to patent a rectangle, I think it is obvious to anybody who isn't biased against Apple to see that (and I do not like Apple). Even their current products remind me of the iPhone, with the distinctive middle home button. But none of this has anything to do with being a foundry. You don't have to fab an SoC to look at the shape of a product, or button placement, or icon design language, which is (if I understand correctly) what the lawsuit was about.
The danger of having a competitor fab your next-gen SoC is that they see you've added 3x the GPU capacity, and so you turn around and change your plans to include 4x the GPU capacity (or whatever). There are ways to firewall one segment of a business from another to prevent that kind of information leaking between departments, and given Apple's obsession about secrecy I would imagine provisions for such containment were included in the contract. Make no mistake, this is tit-for-tat. Unlike Samsung, Apple holds a grudge. Once they got into a huge legal battle, there was no way they would continue being Samsung's customer, even if it was their best choice.
For more Apple choices like this one, see the replacement of Google Maps.