Yes, you can build something like that with three.js
. However, I doubt that a 3D engine is necessary for this.
In context of information visualization, a library like 3D.js is a much better choice. There are a lot of existing examples of so called node-link diagrams or force-directed graphs which could be used to implement your use case.
Force-directed graph component / D3 | Observable
http://orgo.stolarsky.com/
Related topic: Nodes and link with three js