Lithium Ion packs in laptops are part of an engineered system. If you can find the exact same cells used in the pack, it is possible to safely rebuild it. Attempting to modify the pack, different cells, different capacities etc. will all cause problems with the on board charging system that was designed for a specific capacity/brand/type of cell. Most likely you'll have 18650 cells inside, but depending on who made them and when, the actual charging specifics can vary... higher or lower peak voltage and discharge limits. It's not something to fool with, failure of one or more cells can be accompanied with the always delightful "Vent with Flame" event.
If the laptop is of use to you, then spring for a factory replacement pack and relax. If you must tinker, I'd would build an external pack with cables to the laptop and devise a separate charging system.... The so called hobby chargers come to mind, as then you can set the charge rate and such to suit the pack you built. Not a very convenient way of doing things, but if you must, you must. Me.... I'd just buy a replacement from the manufacturer..... that "Vent with Flame" event, while highly entertaining at a distance, really sucks when it occurs in your lap.
That's my $0.02 worth....
Regards
Christian