Creating my own perfectly functional character (skeletal mesh) ?

What I do is I use the exact same structure and my own free plugin to handle/rig/export.

The bone rotation within blender is wholly irrelevant. Once you make the rig you never actually see the bones.

For your information - since you did want explanations - the bone structure works off a single pivot point. The bone length is useless. The position of the tail is also useless.
the bones automatically connect (in unreal ofc) based on their root (the large ball of the default display) and their parenting/hierarchy.
Thats also why in unreal the root bone is often displayed as a stick from the bottom of the character to its pelvis.
Therefore, you can consider the dotted lines blender automatically makes as a coarse representation of the actual bone.

All that said (And like I probably already told you? At this point I don’t know myself ;P), you use the Metarig to do your weightpaint in automated mode, and just rename the vertex groups to match the epic skeleton which then powers your rig movement. But automated paint isn’t good enough, almost never anyway.

The best process would be for you to make a copy of the epic skeleton, adjust them individually in edit mode by using the cursor and moving the heads/tails at the correct spots. Perhaps even toggle the connected status.
To do this, you select a loop (lets say the wrist for instance), you shift s and select the cursor to selected option. You then tab out from edit mode and modify the position of the skeleton by editing the skeleton and shift s + selected to cursor.
after its aligned you auto weight paint (ans save this copy in case you need to edit).
you can then unparent the mesh, and parent it to the unmodified epic rig, which will work flawlessly.

​​​repeating myself, you’ll need to adjust the paint, probably heavily. Common error prone spots are elbows, shoulder/neck, hip/butt area.
Doing it properly, manually, can take days the first time around. Experience will make that take less.

In doing it, you need to remember that the amount of bones affecting a single vertex is of extreme importance. I would say never more than 2 as a general rule of thumb, but some areas (mentioned before) can actually have a single vertex shift in up to 6 different bones with auto paint.
the problem there is the engine has a hard limitation on the skinned mesh.

Also, in case you get into it its better to know this. The paint on any skeletal mesh is truncated. Influence values below .01 are ignored. You should strive to make .1 the minimum value for something that moves.