As I understand it, the proof of the halting problem’s undecidability is conceptually pretty simple. You postulate a machine $h(m, x)$ which (1) always halts and (2) returns 1 if $m$ halts with input $x$, 0 if not. Using this, you build a machine $g(m)$ that spins forever if $h(m, m) = 1$, and halts if $h(m, m) = 0$. Then, $g(g)$ creates a contradiction: if it halts, then $h(g, g) = 1$ and $g(g)$ must spin forever; and similarly, if spins forever, it must halt.
So my question is: does this say anything about the halting problem for machines other than those that solve the halting problem or use machines that solve it? That is, couldn’t you still build a machine $h’(m, x)$ that solves the halting problem for any machine except $h$, $h'$, and any machine that includes $h$ or $h'$? With that restriction, you can’t evaluate $g(g)$, and the contradiction goes away. It seems like such a machine would still be extremely powerful.
Or does the math behind my loose understanding of the proof-of-undecidability preclude this? One way I could imagine this happening is if the precise definition of "except any machine…" can be proved to be not-halting, in which case the answer to my question is basically that the existence (or definition?) of $h'$ is not decidable.
I am not super well-versed in this branch of mathematics, so an "explain it like I'm 5"-type answer would be much appreciated!
(Apologies if this is a dup; I searched for other halting problem questions and couldn't find and answer, though I'm not sure what to add to focus the search. This seems similar to, but different from, this question.)