The avoidance of overcharging is usually pretty easy to avoid: Just use the appropriate charging system – but overdischarge is a bit more difficult, particularly if the battery packs in question don’t have a “protection board” with them.
Lead acid batteries (almost) never come with any sort of over-discharge protection – one must usually rely on the ability of the device being powered to turn itself off at too-low a voltage and hope that that threshold is sensible for the longevity of a 12 volt battery system.
Many larger (e.g. >10 amp-hour) lithium-iron phosphate (LiFePO4) do not routinely come with “protection” boards unless it is ordered specially: Such batteries include some of those “Lead Acid” replacements and some of the more “raw” LiFePO4 batteries available from many vendors, such as the 20 amp-hour modules made by GBS.
While it is also important to equalize LiFePO4 batteries when charging (refer to this post – Lithium Iron Phosphate (LiFePO4) batteries revisited – Equalization of cells – link) the more immediate danger in routine use is accidental over-discharge.
For lithium batteries, one may install “protection” boards that prevent accidental over-discharge and, in some cases, provide charge equalization – but such things are much rarer for lead-acid batteries, but such a circuit is quite simple and is applicable to either Lithium or Lead Acid batteries.
More details at KA7OEI blog.