I have a socket joint I use in 3d printing.
It’s made by booleaning a uvsphere to a box, then booleaning another shape to the result to allow the ball joint to rotate up to 180 degrees.
Maybe it would be possible with the “bevel after boolean” addon:
There are multiple versions of the addon on this page.
However, It doesn’t seem to work in the current version of Blender, so you might need to use an older version.
If that’s not an option, I have a method that will give you the look you want, but the topology will be even messier. Also, I don’t know if it’s precise enough for your case.
1-Use voxel remesh on the object. Go as fine as is reasonnable. If you used the remesh modifier, apply it
2-Use the “smooth” modifier and increase the “repeat” setting until the corners are rounded as you need. Apply the modifier.
3-Use the decimate modifier so the object has a polygon count that can be worked with. Reduce until you start seeing a visual difference, then go back a bit to give the mesh some margin.
4-If the outer corners need to stay sharp, you can extrude the outer faces before the procedure and then boolean them back to perfect flatness at the end.
The last few days I have been playing around with the Blender 3.3 alpha and attempting to build a geometry node setup that creates procedural bevels for just such situations:
rebuild the mesh around the intersecting edge with a bevel.
I will probably create a topic later this week (or on the weekend) where I explain in detail what this setup does (and believe me, it involves a lot of bad hacks).
Also, it is quite buggy, so do not expect this to become an add-on anytime soon
I used base meshes with a lot of geometry for this and moved the edge loops of the cylinder around until the result was clean(ish).