Yeah, that's what scares me.
Well if the thought of buying used bears too much uncertainty for you your other alternative is to buy new or new enough to have a warranty. But what you would essentially wind up doing is paying for the replacement battery at the time that you purchased the vehicle due to the increased cost of getting the car in the first place.
You either have to pay upfront to alleviate the risk or you have to accept the risk that you may have to pay . There is no free lunch. My advice get the car and enjoy it.