I agree that DIY battery repair is quite dangerous. But my point is that we should regulate and control the danger directly, instead of indirectly and very imperfectly by just grant ebikes an exemption in right to repair laws, especially as there are plenty of none battery components that (motors, controller boards, actual control inputs, etc) do not carry nearly the same safety concern.
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).
I think e-bike exemptions would be acceptable to me under the condition that the manufacturer would have to supply refurbished packs (new cells) for a token fee.
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).