OpenSCAD / FreeCAD splitting, hollowing and threading model
OpenSCAD lacks any facilities to perform computations on the resulting geometry (derived from CSG or directly imported). It has a decent functional language for expressing geometry in terms of parameters and functions/modules, but the road is one way; geometry is an output only and doesn't loop back into input. So automation of this entirely in OpenSCAD is really not an option.
On the other hand, doing it manually is rather easy. You can use CSG operations (intersection or difference) to cut the model, cut a compartment out of it, cut threads in it, etc. as well as (union) attaching external threads. You just have to decide how to size and position them for your model yourself.
Note that there's no canonical module for doing threads in OpenSCAD. You can either derive the cross section for your thread profile (can be done with OpenSCAD code) then linear_extrude it with twist (needs really fine division to be accurate though) or skin a polyhedron for the thread. There are a few published modules for the latter and I have an unpublished one I prefer.