65 driveshaft possible upgrade

This article has the information you need for the driveshaft:
https://www.earlycuda.org/techdocs/ConvertFrontUJoint.pdf
Also be aware that in order to run the early transmission behind your 340, you will need to use a spacer/adapter bushing in your crank flange, since the pocket in the crank that the nose of the convertor fits into changed diameters in 1968, becoming larger than the '67 and earlier versions.
I believe this is the correct one:
Torque Converter Flexplate/Crankshaft Adapter, 1.81" OD x1.55" ID, A904, A727 | eBay
The ball and trunnion, if in good shape, will more than adequately handle your projected 400hp power level. They did just fine behind the early factory race hemis, even with a 4 speed.
That bushing is to put an early small hub transmission in a large hub 68 and later slant 6 or a small hub 273 transmission in a large hub 318,340,360 crank.