Since you speak of loading the stuff into PostGIS, let me observe that it’s easier to do some of these tasks in the database.

(1) Use osm2pgsql, imposm3 or a similar tool to import only ways that are tagged highway=* (and not motor_vehicle=no). Both of these tools can use custom style sheets to specify in great detail what objects to import, and what tags should correspond with columns in the database.

(2) Use the PostGIS function to divide linestrings into segments of the desired length. This is a little tricky, but there’s a worked example at https://postgis.net/docs/ST_LineSubstring.html (which makes 100-unit strings) that you can adapt.

I don’t understand exactly what it is you want to do with ‘crossroads intersection’. If by this you mean, that no segment of a road should continue past an intersection with another road, then it sounds as if you are trying to create a routing graph (and your mention of ‘studying graph theory’ suggests this, too). In that case, you might want to investigate the pgRouting extension to PostGIS. There’s a fairly gentle introduction at https://workshop.pgrouting.org/2.0.2/en/index.html