There is a lot more to battery health and life than the cycle count. You can have a battery with an extremely low cycle count that can be worn out when the Battery's Full Charge Capacity drops below 80% of Design Capacity (unfortunately Apple doesn't provide an easy way to get this information so most users have to end up using Coconut Battery to get this information). Of course for some people a battery with a Full Charge Capacity below 80% is still Ok depending on how the laptop is used. A battery can also develop a hardware fault at any time regardless of the age, cycle count, or Full Charge Capacity. The older a battery is the more likely it will have diminished capacity and the more likely it will develop a hardware fault.
Edit: I completely agree with @etresoft that it is dangerous purchasing a used Mac anywhere but directly from Apple. If the used Mac ever has the firmware password lock enabled and you don't have the password, then you will never be able to remove the firmware lock because you won't have the necessary valid proof of purchase to prove ownership of the Mac so Apple can remove the firmware lock.
I highly recommend you perform a clean install of macOS on the laptop by first erasing the whole physical drive before reinstalling macOS. This will immediately let you know if the laptop has a firmware lock enabled plus you may discover whether the laptop is still being managed by the previous owner since usually a message will appear when setting up the new OS. However, you don't always get a notification message about the Mac being managed so this is not a fool proof method. I sometimes see the management notification appear after running a clean install of macOS for several days and it is easy to miss the message. Keep in mind if the previous owner is still managing the Mac, then the previous owner is able to control the installation of software, impose restrictions on the Mac, and may even be able to remotely access and control the Mac.