Hey @tidyboar, great observations you're making! I agree with a lot of what you're saying. The thing is, all of that works when \(d\) is prime. For example, how many numbers from \(1\) to \(5\), when multiplied by \(3\), is \( \equiv 1 \text{ (mod 6)}\)?
When you make the table, you'll realize that all of the numbers after being multiplied are either \( 0 \text{ (mod 6)}\) or \( 3 \text{ (mod 6)}\), so actually none of the numbers are \( 1 \text{ (mod 6)}\) The reason why this doesn't work is because \(3\) is a factor of \(6\)! And actually, you can remake this problem with any even number and you'll find that there are a lot of exceptions.
BUT, what you said is actually really useful!! Number theory often involves prime numbers, so everything you figured out will save you a lot of time when actually doing problems. Way to go for understanding everything!