1おきに can mean “every” or “every other(second)” by extension depending on a counter.
It is because おきに is used to describe an interval between events.
Rather than saying “every X”.
If variable expresses something that is continuous like meters, minutes and hours etc 1おきに will mean "every second/ every minute/ every meter etc.
If variable expresses something that is discrete like days, weeks and months, steps, etc
1おきに will mean “every second day, week, month”
This expresses continuous variable, let’s say hours.
Black dots express hours, but between them we have minutes.
So the interval of one hour means 60 minutes. White dots express 10 minutes.
So after an interval of 60 minutes, we have the next event at 2 o’clock.
So you can say that the event happens every hour (at 1st o’clock, 2nd o’clock etc).
That’s why 1おきに can be swapped with 1ごとに for those.
For discrete variables the situation is different.
Let’s say our variable are days. We assume that day cannot be split.
1 - Monday
2 - Tuesday
3 - Wednesday
4 - Thursday
5 - Friday
The event will happen with an interval of one day.
Black dot expresses the interval.
So the event happens on Monday, and Friday.
So we can say it happens every other (second) day.
That’s why １おきに cannot be swapped with 1ごとに、but with ２ごとに。
Is it more clear now?