Why is electroporation not the prefered choice transforming for Mammalian Cells (HEK)?
Viral methods are just more efficient and give you a higher viability in the end. Electroporation works but you'll have a low yield of viable cells after. Here's a nice paper looking at the effects of buffer composition on cell viability/transfection efficiency: https://www.nature.com/articles/s41598-020-59790-x with the general take away being, if electroporation is working well enough to transfect the cells, it will also kill a fair percentage as well.
Hek cells in particular are pretty easy to transfect through viral methods for stable integration of your plasmid or Fugene/lipofectamine for transient expression.