As far as I can read, in both cases the HP maximum is only drained if you fail your Con saving throw. If you save successfully your HP maximum stays the same, therefore it doesn't drop to 0 and thus you don't die from Life Drain (regardless of whether the raw damage still kills you).
The two instances of the text are worded a bit differently, but in both cases it states rather clearly that the dying automatically part only refers to the maximum HP. Note how, even in the adventure's wording, the attack only reduces the target's HP maximum if the effect kicks in due to the failed save.
No, you did nothing wrong.
There are a few things here that stand out to me regarding the Glassstaff fight on which I can elaborate a bit.
Surprise is very powerful
Average damage and healing numbers compared to average hit point pool sizes just mean that the most effective way to win a fight is simply to put out more damage faster than the opposite party. Surprise helps a lot with this.
Smite + Crit = Ouch
Paladins are notorious for their crit smites. It is indeed correct that a crit will also double the damage dice of a smite, so when it happens there's not much you can do but smile, be happy that your paladin got his moment in the spotlight, and say goodbye to your monster. This is a big part of why some people play paladins and it does use quite a bit of their daily resources.
Low level encounters are very swingy
Low level encounters are in my experience quite hard to balance, simply because your players' resources are still very limited; Their hit point pools are very small, so a single (un)lucky roll from a monster can knock them out. They have few spell slots to mitigate incoming dangers. They have only one attack per turn and low attack bonuses, so a little bit of bad luck means the whole party might put out no damage at all for a whole round. This means that you have to be very careful with setting your monsters hit point maximum and average damage output, or a fight can turn very sour very quickly - at low levels at least. This also means that it's generally better (depending on your group's desired playstyle of course) to make encounters a bit easier than normal.
The action economy
5e takes great care to make sure that the action economy is kept stable, that means creatures (monsters, npcs and players alike) must have a very good reason to be able to make more than one action per turn (with the exception of legendary and lair actions for higher level boss monsters, which only exist to fix exactly the problem in this case). This, again in combination with the way the combat works (more damage faster wins), means that a group of four versus a single enemy has a huge advantage, because the single enemy has only a quarter of the actions available and is a lot more vulnerable to bad luck.
What you could do differently next time
Make it harder to surprise the enemy
Maybe the wizard had cast alarm on the other side of the secret door, so he knows someone is there, or make the secret door harder to find.
Dynamically scale up a monsters max hit points
This is something I do a lot. My players usually play pretty optimized, so if it looks like an encounter is about to face an abrupt and anticlimactic ending, I simply retconn a monsters hit point maximum to a higher value that is still within the hit dice range. So for example "Glassstaff", who uses the statblock of an evil mage has 5d8 hit points, or 22 on average. In this case I might have probably just increased his maximum to the actual maximum, 40 (5 * 8), which would have left him with 9 hit points after an average critical smite, so he can at least act once.
Balance the number of opponents
After all, that's what the guard quarters two doors further down is meant for. Either have a few guards in the room already to deliver a report or whatever to their boss, or have them join the combat midfight, because they might have heard a noise. Although, if your players made sure to prevent that scenario, either by clearing out nearby guard quarters or eg. casting silence to muffle the combat noise, make sure to give them the advantage of such careful preparation.
Best Answer
It's possible, but casters will have a field day
Lost Mines of Phandelver has a lot, a lot of encounters that consist of mostly low HP enemies that will die to a single AoE spell, two tops. At first this might not seem like a big deal, but it is when you combine a lot of easily AoE'd squishy enemies with the ability to get your spell slots back very, very quickly.
LMoP ends before your players will get access to true powerhouse spells like Fireball which will instantly end encounters, but a lot of first level spells will easily end encounters if you can simply spam them.
Even with only a single spellslot, a warlock who can get their spells back in 5 minutes will have no reason not to blow up everything in sight, then rest 5 minutes and do it again in the next fight. This will make your non-spellcasters feel a lot less exciting, because those classes are generally better in longer drawn out days where you can't simply unload all your resources into a single problem.
Now this might not be a problem if your casters mostly use spells like Sleep, but if you have a caster who specializes in blowing things to kingdom come you'll see a lot of fights end before your rogue and fighter have even gotten to the fight, leading to frustration.
The only fight I can come up with where your players are likely not going to notice the difference is the dragon, in the rest of the fights, classes specialized in spending x-per-rest resources will feel far stronger than your rogues or fighters. Considering you have first-time players, this might make some people think this is how D&D is always going to be, and they'll be turned off from playing characters that work better in drawn-out days because they believe they are vastly inferior to casters with AoE spells. (A problem I've encountered DMing for new players even when not using epic heroism.)