As far as the motor controller is concerned, the battery might as well just be a single cell. If you change to a different kind of battery, you might need to change some of the motor controller's parameters (like maximum current limit) if those were designed around the limits of the old battery.
edit to add: when it comes to the charger and BMS, that stuff might or might not have to be replaced depending on the extent to which it can be made to work with a different configuration. And just like replacing an engine in a modern gas-powered car, there's probably a host of sensors that will trigger a whole host of warnings if they aren't reconnected to equivalent new sensors or spoofed in some way.
Basically the only way for car manufacturers to make this interface hard to replicate with third-party packs is by introducting some kind of DRM-like signatures on the messages from the BMS.
While this could be true, I certainly wouldn't assume it to be so. I dunno how integrated the battery pack is to the system - when you press the gas, does the car do things like draw more from some cells and less from others based on their degradation and capacity? Certainly on the charge side of the system it's very integrated, with the charge curve changing as individual cells (or at least modules) age/degrade.