For the sentence "The container quality has to be good. Only then would the contents inside be good."
My teacher suggested "入れ物の品質がよくなければ、中身もよくない"
But I'm not sure this conveys the necessary condition of the container quality being good for the stuff inside it to be good as well. I was also considering 中身の良さのために、入れ物の品質の良さが必要です works but it sounds a bit clunky to me.