It depends on the opponent, in that specific situation, you didn't really do much wrong, you couldn't have counted on failing those charges.
However, it depends on the list I'm facing and the army I'm using.
For example, I fought against a White Scars Gladius with my
DE, I made a huge mistake by placing my objectives all around the table, and spreading my
MSU out for board control before the bulk majority of his force came on from outflank.
This allowed his guns to kill my
DE units piecemeal (not hard to do) but I didn't have reinforcements.
Normally I like redundancy in
40k, when it comes to charges, shooting, and my overall list. I like having at least three units that can accomplish a certain objective (a rule of three, guard players live by it), so say I can charge a unit of terminators into a unit of marines, I will also throw some assault marines in there, just to make sure (especially if it is vital to the mission that those marines dropped).
Obviously this is very hard to do with an elite list, however, generally if you are facing a tough army (necrons, deathguard, etc etc) then make sure you either buff all of your
GK to super human levels, or dedicate multiple units to killing a single unit. A glance on a vehicle still allows the vehicle to function at full efficiency for example. For a hardcore
MSU list (gladius in normal/small games, most Eldar/Dark Eldar lists nowadays,
KDK, etc etc) then it is pretty easy to send units all over the board because they won't get bogged down and the such.
Hopefully this helps a bit, this guide is far from universal, but I think it works as a general rule of thumb, Its what I use at least