Usually when ABS plastic breaks like this, you can’t salvage the part and it breaks again. I’ve tried before and it never seems to fix, at least long term. In your case, you’re between a rock and a hard place. The keyboard is part of the palmrest so you need a upper case assembly, which increases the cost to repair the laptop, and it’s not practical to remove the keyboard and try and salvage the situation - you have to replace both, in practice (to add insult to injury on the Consumer machines, it doesn’t serve any benefit besides feeling spiteful). The other problem is being an HP Consumer machine, this happens more often then the other vendors (although, yes they all seem to have issues on the consumer side with this, and it’s a pretty common design flaw). This is not as bad on the Commercial notebooks - especially with the magnesium service panel which acts as part of the hinge mechanism to prevent this to some degree.
This is the design in a Lat 7490*, by the way:
Dell’s design ain’t perfect either, nor is HP’s Commercial fix for this but it's still an upgrade even if it doesn't have the full magnesium chassis anymore. However, both of them have better overall hinge durability. The catch is it means if you’re dealing with a non-captive screwed system like the 840 G3, you need to give screws to the left and right top holes and leave another hole that’s not critical empty OR it does put the palmrest “at risk” of damage.
*If you want one, make sure it has the 8th gen CPU (Ex: i5-8XXXXU) rather then 7XXXXU. Thankfully, the 7th gen option isn’t horribly common BUT you need to check. Don’t buy this model if the seller is unsure because they’re not fully disclosing it to limit your recourse**, or have no knowledge of the specs (and need someone to at least look over the installed CPU). If the service tag is hidden, assume hidden 7th gen.
**The photo one is missing the M2x3 trackpad button screws (which I had on hand), so it feels like an abandoned project to me - especially with the missing battery/cable - (knowing Dell, probably expanded). I had enough information I wasn’t worried about it due to the CPU (i7-8650U).
It may work to bide your time while you save for a newer computer if you are considering a new system in the future (or at least, time to find a replacement upper case assembly), but I would not rely on a part repaired in a critical area like thing long term, especially with super glue or Epoxy unless it’s a low stress/non critical screw.