Sight-unseen, it's not easy to estimate the costs to repair/replace a wood foundation. BUT, to understand what's involved, you can figure that it will cost some bucks. (The insurance liability for the contractor is a big part of this type of project.)
The house would have to be jacked and supported. A foundation would have to be dug and formed and poured. And after setting the house down, things may begin to 'crack' and split because of your nice, new, straight foundation.
Since you're having the home inspected, get an ASHI-Approved inspector that's experienced in older homes and is versed in the structural aspects of homes. They're out there because my inspector is/was a retired Structural Engineer. By their Code of Ethics, they're allowed to give estimates for repairs. IF he/she offers to FIX the house, that's a conflice-of-interest. (Immediately report them to ASHI.) However, they are allowed to give 3 recommended contractors.
As for major Red Flags, let your experienced inspector guide you on this. My best to ya and hope this helps.
PS: I'm not a Home Inspector but I do value their work (even for NEW home construction) ...