Care is a big component as well. The real power of cast iron is that you can renew the coating when it wears off by re-seasoning the pan. Using a drying oil like flax, you coat the pan and heat the oil until it starts smoking, then wait for it to stop smoking. Repeat this process a couple of times and you have a durable non-stick surface again.
If you ever have the surface roughen up you can also strip the old seasoning by covering it in oven cleaner and heating it to cleaning temperature. The easiest way to do this is to stick it in an oven on high.
I’ve had the same frying pan for 10 years now and this is how I keep it non-stick.