Somehow tactics is only a part of the midlegame.
incorrect. There are tactics in endgames as well. Slightly less, but still exist.
Some in openings as well! Opening traps?
opening traps are tactical but more memorization than tactics.
true
Strategy and positional play are everywhere. In fact move 1 e4 or d4 is already strategy. Tactics are servants of strategy. Tactics flow from the color with a superior position.
Funny thing is I should be studying openings. I can't tell you the number of times I get crushed by weak players who trot out sharp gambits I've never looked at! Note to self - spend a weekend looking at gambits.