My plan is to use a 2x4 instead of what you see there

here is where it will go
That could be as simple as gas pipe surrounding a good sized lag bolt... If it was me, I'd counterbore the pipe about 1/2" into the post and rail to stiffen it up.
It looks like your "theme" is those 1x elements - 1x6 top rail, and maybe 1x3 or 1x4 lower rails. I'd suggest you gen up a 1x3 or 1x4 hand rail, with another at a right angle to provide stiffness. (That is, create an "ell" shape, with a smooth top surface horizontally, and another board mounted vertically below one edge.) This would be a great place to use that pocket-hole jig you've been wanting to buy. ;-)
It looks like you could fasten this directly to the posts, avoiding the need for any mounting hardware other than nails, screws, or whatever you're using for the rest of the deck.
Edit:
Here's a bad picture of what I meant: post, two 1x boards at right angles for the handrail.
Well the first thing you could try would be to get your socket wrench and take that hardware fitting apart to see how it is made. Perhaps you could take it to a hardware store and ask for a match.
If you don't want to do that then try this. First, measure the outside diameter of that metal shaft. Then buy a piece of pipe and three washers whose outside diameters all match up exactly (and are about the same as that shaft). You will also need a wood spade or auger bit of the same diameter, to make the flat-bottomed countersink holes.
The pipe should be 1/2 inch longer than the distance you want behind the railing. The ends of the pipe should be flat and perfectly squared off.
Also get a hefty lag bolt. Use the thickest that will fit through your washers. Use the longest that won't go all the way through the vertical post.
Assemble and install the hardware like this:
The washers keep the metal hardware from punching into the wood. The close-fitting countersink holes keep the pipe and washers exactly lined up. The tension of the lag bolt together with the close fit of the countersink holes keeps everything from shifting or sliding around. The pressure of the washers against the hardwood contributes to the strength of the installation but most of the resistance to bending comes from the stiffness of the lag bolt.
I have used this pipe-and-washer construction to make a table and chairs. They didn't wobble.