I sold my house two years ago after owning for 17 years, I paid $5000 to repair foundation by puting over 10 concrete piers at front side, then repaired cracks inside and outside in 2009 (Cost about $3000), cracks came back again at same places and new places on ceiling, I had to get engineering report in order to fix foundation in 2018, there are total 12 piers in side of the house costs me over $8000, more cracks came after repairing foundtion, no cracks after one year, then repairing cracks and paint whole house costs me $6000. The house is 3112 sf two story and was built in 1998.
It looks like you have to repair cracks at least every 10 years caused by foundation even if you are living there and watering the yard very well. So do not buy foundation problem houses.