Wood screws do, however, hold extremely well in cross grain. So the trick to making screws really hold in the end of a piece of wood is to give them a bit of cross-grained wood to bite into.
The easiest way to do this is to put a hardwood plug into the wood, 5/8" or 3/4" in diameter. Drill a hole that goes nearly through your piece of wood with a forstner bit, and then glue the dowel in place. After that, drill the screw hole from the end, and screw in the screw.
The illustration at left shows how far the screw would penetrate, if it was actually in the wood.
This approach is much cheaper, and probably stronger, than using some specialized fastener using a machine screw and some sort of specialized nut to insert in a hole. Plus, there is no chance of losing any parts of it if the piece is temporarily disassembled.
I use this apporach for screwing bed rail clips into the ends of bed rails for my bed frame and my daybed, where good hold is very important.