If you are not camping or cooking, it's easy to spend $100 a day on just the basics. It's not hard to spend more, and you probably will. For example, assume it's 5:00 p.m., and it's been a hot, tiring day. You pass a B+B for $85 a night. Should you check in, or continue on, as you originally planned, for two hours to a cheap motel that will cost $50? (Plus tax, plus breakfast). I know what I would do!
Costs add up quickly over 40 days, even without the need for emergency repairs. $5000 sounds reasonable to me as it gives a cushion.
If you plan to camp and prepare all your meals, count on $30 - $55 per day: $15 - $20 for camping, $10 - $25 for food and drink, and $5 - $10 for miscellaneous (tourist attractions, laundry, replacement parts, replacement clothes, tools, toiletries, medication, etc.) So in the extreme cheap case, that's $1200 for 40 days, but I would suggest budgeting $1000 or more, just in case.