If you look your black shapes in high zoom, you see that they are anti-aliased, their borders are fuzzy to make them visually straight (=not appearing as stairs). Thus no selection can select those black shapes, all of them and nothing else. All possible selections will be compromises that leave out a little of the wanted or take along a little of the unwanted or both. Playing with selection antialias settings you maybe find an acceptable compromise.
Selections are harmful. You cannot draw them freely until you are ready. One unthinked click and it's gone. For example drawings are much more robust and there are also better tools to edit them.
My suggestion: Make a new layer, draw there a solid image which covers your wanted selection. That can be a vector shape or a bitmap pattern. Edit it until it's ready. High zoom, layer opacity+blending modes are essential tools to see the result and compare, if you use the bitmap version. Then make it to your selection. Try different antialias settings.
Professional image manipulators often draw paths. They can be edited until they are perfect and a selection is made. Mastering this should be also your goal.
I would make a copy of the image layer and adjust its contrast and colors as clear as possible. Then I would draw with the pen tool (clicking only) a path, edit it perfect with the direct selection tool and finally make a selection, this:
High zoom makes imperfections visible and the corner points are easy to move without destroying the straightness and other points. Moving the selected point is possible with arrow keys even outside the visible area.
Hopefully this was coarse and precise enough.
ADD: If this happens to be the whole image, not a small part of it, redrawing as vector shapes, even going to Illustrator for it, should be considered.