This is a tricky question. Lithium batteries are quite happy charging off appalling power quality. You can rectify AC and dump it into the pack without filtering, so long as the peaks are within limits. The battery WILL filter it to some extent, but relying on a low enough ESR pack to ensure no issues with other electronics inst terribly sensible in production long term. It's quite complex and depends on what else is on the battery.
The charger always dumps 100% of its output into the battery. It has no mechanic or intelligence to route power anywhere. Now, the power will preferentially go effectively directly into a load as that would be a lower resistance path than intercalation. The pack has some non zero internal resistance, so a voltage rise is required to force current into it. This means the chargers output leads will be higher voltage than the battery while it is charging, making the battery practically invisible for most low frequency light loads.
The SMPS that charges the battery typically won't have much of an objection to high THD. It may have some impact to efficiency, and as a result very high THD on the input can lead to significant impact to heating in some cases. But within sensible limits, bad incoming power inst very important. It's likely the PCS is protected against horrific power quality, and it absolutely has thermal protection. So while it is technically possible to design a charger that works in remarkably bad conditions with absurd swings, Tesla would be the one to know how their design performs and what the software allows. I wouldn't really say the SMPS is buffered by the battery though, thats kinda true, but misleading. You really don't need to be overly concerned with power quality though, just as long as voltage is within range. Even if its for 20ms or something, high voltage might be an issue depending on how high, and how much load is on the charger at the time. So you still need to be careful running a generator near its limit. If the charger stops suddenly, voltage can spike massively. I suspect in practice the risk of damage in this case is low, but non zero.