I don't think it's a stupid move. {{hugs}}
Hope you are recovered from your mishap and are none the worse for wear.
It's one of those things that happen when you do something so many times that it becomes austomatic. After a while, you don't think about it, you just do it on "automatic pilot" and that's when it's easy to make a mistake.
I took one of my DD's pills once instead of my own
I had hers and mine sitting next to my plate at the table (out of the bottle ready to pop in the mouth). I was talking to someone and not paying attention to what I was doing.

The second that I swallowed it (and it was too late to do anything about it), I knew what I hade done.
Luckily, it didn't really do anything to me and I did not give mine to her.
After that, I separated giving our pills so that we were not taking them at the same place and time.
What I do with her medications is when I give her evening and midday dose, I prepare the next dose and put it into a "holding bottle". She has a morning and evening dose of medications that are the same and a midday dose that is different. So, if I look into the bottle and see the morning pills still in there, I know I didn't give them yet. The evening dose isn't put into the bottle at all, I give it right away, but at the same time as I'm giving the evening dose, I prepare the next morning dose. So, if I'm not sure I gave the evening dose, an empty "holding bottle" tells me I'm right.
This sounds pretty confusing seeing it written out, but it's kind of the same idea that Cheshire Figment mentions - have something else that you don't do
until you have taken your medication.
When I was a public health nurse, I used all the hints that other people have mentioned (the upside down bottle, the calendar, not doing something else until after taking the medication). Another thing some of my patients used was a container with enough separate spots for the number of doses of medication to be taken each day. You start the day with all the bottles in the first spot. As the first dose is taken, the bottle(s) move to the next bin. At the end of the day, all the bottles are moved to the next morning slot.
The common thing to all these strategies is that they are building another habit into the medication habit.