@jess-yan threejs has this ready-made somewhere(taking mouse point and returning meshes under it),
I will most definitely post it on the forum here when I have this feature.
This MAY require a shift away from how jscad works now, but hopefuly can be done with current jscad setup.
The idea I have for now is to run a AST transform to inject line number information into the script and then run the modified script. This is something I am able to do, but I have other stuff in the pipeline before this 🙂