Most "STL to STEP" converters wrap every triangle in a STEP face. The file opens in CAD but you cannot edit it: thousands of faces, no cylinders, no holes to resize. mesh2cad fits the mesh with planes, cylinders, cones and chamfers and writes an exact B-rep STEP.
Steps
pip install mesh2cad (Python 3.10 or newer)
mesh2cad convert part.stl -o part.step
Open part.step in FreeCAD, Fusion 360, SolidWorks or Onshape.
When it works and when it refuses
Works best on mechanical parts made of planes, cylinders, cones and chamfers (brackets, holders, printer parts).
Organic shapes (figurines, scans, sculpted surfaces) are not recovered as exact surfaces.
Every export passes a self check against the original mesh (deviation and volume error). If a part fails, mesh2cad refuses and tells you why instead of giving you a wrong model.
On our 6 Prusa printer test parts: exact STEP for 6 of 6, editable CadQuery/OpenSCAD/FreeCAD macro for 6 of 6 (v0.16.0).
mesh2cad is free and open source (see the GitHub repository for the license). Found an STL it handles badly? Open an issue with the file.