What was I doing wrong?
Well in drilling you could probably have done with:
- much more frequently withdrawing the bit.
- A more powerful drill. Cordlesses aren't exactly known for their grunt, and many are not the match of an 'equivalent' corded drill.
Twist drills (and many lip-and-spur/brad-point bits, which are roughly similar beyond the tip shape) are famous for packing solid with wood swarf, and the deeper the hole the more and more likely this becomes because eventually there is no more flute for the waste to travel up.
Once the grooves are packed, or completely filled, further progress becomes nearly impossible and stuck or broken bits can result. Prior to this smoking is a warning sign to look out for, although some of that is just the inevitable shaft rubbing against the inside of the hole1
Then once it came time to inserting the screw:
- lubricating it first; soap, oil or a fat of some kind, grease, and wax have all be recommended for this by one source or another and all work.
- Again using a more powerful tool (e.g. a brace) to drive it.
Lubricating screws, especially when being driven in to hardwoods and even more especially with long screws, used to be standard advice but is now becoming lost for various reasons.
While braces may not be really practical for driving large numbers of screws in a production environment for occasional situations they can still be a valuable part of the toolkit. They make exceptional screw-drivers as I briefly described in a previous Answer. You'll probably want to keep at least one brace around, even if only for driving screws, once you've experienced how pleasurably easy2 they make it.
Since you ask about pilot hole sizing in the Comments, regrettably there is no one guideline here. The Internet is lousy with pilot-hole sizing guidelines, some of them reprinted from old shop manuals and the like which would typically have two columns or two separate tables, for hardwoods and softwoods respectively. But unfortunately such tables aren't completely consistent, and perhaps we shouldn't expect this because it's not like all hardwoods and softwoods are the same hardnesses!
So sometimes it's a case of just trying some sizes (assuming you have a range of bits available that are approximately in the right range) and seeing what works best. As a general guideline it's far preferable to drill a slightly undersize hole than one that is even fractionally too large, as an oversize hole leads to a much weaker grip in the second piece of wood.
Where a table is not to hand, the rule of thumb is to match the pilot hole bit to the root diameter of the threads; while you can measure this just eyeballing can be good enough in many cases.
Don't forget clearance holes! If used, the clearance hole should be larger than the pilot (large enough that the threading can't engage at all).
The better fix
There are different philosophies of repair and reinforcement of furniture, and a lot of it is just individual judgement calls. But many pros do their best to avoid screws where they aren't an integral part of the original design, on reason being that over time they have a nasty habit of working loose. Unless they've rusted into place, which is another problem.
Here, you had two quite large long-grain surfaces which potentially make for the ideal glueing situation. So just glueing and clamping could have been sufficient, providing plenty of clamping force could be applied during the glue-up if using a PVA-type glue or foaming polyurethane. Or, as you've done, using epoxy instead if very strong clamping couldn't be arranged and/or the glue surfaces were in any way gappy (because epoxy is a good gap-filler while the previous two adhesives are not).
If further reinforcement were deemed necessary — and given there's no actual joint here, as would have been traditional, there's a strong argument in favour of it — adding one or more additional dowels makes a lot of sense. Dowels have a good assurance of providing a near-permanent solution, certainly outlasting the current owner of the piece all thing being equal.
1 Which I think black-finished bits are more prone to than with other coatings which have lower friction.
2 Just to give an idea of the difference, where I've had a screw become too stiff to comfortably turn with a conventional screwdriver, or just get stuck outright, once I changed over to a brace it would often require no more than fingertip pressure on the sweep handle to finish driving it home.