The question about leaving chargers switched on for long periods is a good one.
There are times when they need to be, for example if the battery pack gets a bit out of balance, perhaps from a period of little use, then it can take a lot longer than normal for the charger to complete the balancing phase of the charge, maybe an hour or two longer than a normal charge.
Charger quality is also variable. I've seen some truly appalling ones, along with a few good ones, so it's hard to generalise. It would be nice to think that all ebike chargers are certified to the same sort of high safety standards that we'd expect for good quality domestic appliances, but the truth is that there are a fair few really dodgy ones around, especially amongst kit/DIY ebike parts. I've seen one truly appalling one, that, when I took the cover off (to find out why it had failed) did not meet even very basic electrical safety standards, was not double insulated, had the live and neutral wires crossed internally, had inadequate insulation between the mains input and the low voltage output, wasn't fused or protected internally and had loose blobs of solder floating around inside the case ready to short things out. It carried a "CE" mark and appeared to be approved, but clearly wasn't. Out of the five or six chargers I've bought (rather than made myself) two have failed, luckily without causing more than a puff of smoke.
Given the above I would always try to ensure that chargers are turned off and disconnected as soon as the charge has finished. I'd also never, ever, under any circumstances, charge an ebike battery inside the house any more. I now charge my bikes outside in a car port, with the charger running from an external power socket. I use a time switch to turn the charger off after a few hours if I have to charge overnight, to minimise the risk of it failing from being left on for a long period after the battery has charged. I make sure there's nothing flammable near the bike or charger when it's charging.
Even the very best lithium battery and charger designers can get it wrong (witness the current crop of Boeing Dreamliner lithium battery problems) so there is a fair chance that a built-right-down-to-a-price ebike charger might be slightly less safe than some other items of domestic equipment.