I've built a 2.2 KWh pack and spent weeks preparing for the build and did that in my own house in a spot right next to a door just in case I f'd up. Which I didn't, but I was fully prepared for that. You should never do something like this in an apartment building, any more than you would start a metal welding shop or a chemical plant in your living room. The risks are not compatible with shared accommodation.
There could even be a reasonable harm reduction argument that providing proper parts, tooling and documentation would actually reduce the risk. I could see reality going either way on this.
But in any case, arguments from safety should be directed and focused on actual risks. We have laws and building regulations for this reason. As you say, you wouldn't start a melding shop in your living room, but we don't ban anyone from just buying a welding machine.
Seriously: on the scale of 1 to 10 for risky things you could do I think DIY e-bike battery repair should rank higher than parachute jumping.
Finally, the degree of access required by the NY law is broadly summarized as "same level that an OEM would/does provide to dealers or authorized repairers". E-bike manufacturers could easily (and quite reasonably, based on safety concerns) limit that to whole battery packs (because for exactly the safety reasons you noted, basically no repair shop is going to want to do cell level tinkering).
NYC has had over a dozen e-bike related fire deaths year to date, almost entirely killing bystanders. One guy was modifying battery packs in his kitchen, ran out the front door with his arms on fire and his whole family burned to death. A shop in Chinatown was letting dozens of customers charger their batteries overnight in the store and the fire killed tenants upstairs.
So we obviously need right to repair on electronics, but people questioning if we need carve outs for things like battery packs are not Unabomber luddites.
I have some home power tools that use lithium battery packs and they are extremely rugged and overpackaged for safety reasons compared to what I see on these e-bikes. That may be another avenue of regulation is simple minimum standards to thermal runaway resistance and containment in consumer grade lithium battery packs.
And this bit even has nothing to do with right to repair! People will do stupid shit that puts innocent bystanders at risk. That's just life. We should put into place measures that disincentivize that sort of behavior, of course. But giving companies a pass to make hermetically-sealed, unrepairable garbage is not how to do that. Ensuring that customers have detailed documentation and access to affordable, well-made parts so they have the ability and understanding of how to safely do repairs would be a good start.