Draw walls/meshes from textfile/LiDAR data

Hello,

I am trying to implement a tool which would allow you to load and draw walls, corridors and some simple objects from LiDAR data.

So far, I dont have any actual LiDAR data yet but instead I have used radial traces attached to a vehicle to “harvest” coordinates of surrounding walls in the level and write them to a textfile like this:
X=600.000 Y=31.000 Z=58.000
X=600.000 Y=41.000 Z=58.000

I tried to spawn Instanced static mesh (small cube) on every coordinate but that had terrible performance (there are thousands of points). It is not crucial for the walls to be perfectly aligned or even have collision, I just want to have some kind of consistent visual representation of the loaded data from the textfile. I checked littlebit the Procedural mesh generation method but I cant figure out how logically could I calculate the vertices/rotations needed to create the mesh. For example a long straight wall would be easy, I would collect long block of coordinates, where X and Z is the same and only Y is changing and from that figure out its actually a line. But turns or more complex objects are a problem when considering 3D.

Any idea please how could I achieve anything like this?

Thanks in advance for any hints