There is some good stories out there that address the permanence of magic in a variety of ways. A common one is that magic draws on the will or life energy, usually of the caster. This very basic limitation can be twisted and turned into all kinds of things while remaining internally consistent.
With that limitation it becomes really hard to build a perpetual motion machine to make magic bypass technology. If the caster no longer focuses their will, then the machine stops unless you start it up again. That is the direct application, kind of like pushing on a rock. When you stop, it stops.
Then you can come up with things that extend or store the energy. A common one is Runes. Invest a lot of energy up front into a rune up front and it will keep going for a while, but will eventually fail. The better or more perfectly executed runes are more efficient, and will go for longer, but the energy is finite.
There is nothing at all stopping you from making the energy transfer two way. Allow for runes that will absorb solar energy and release it back on demand. Then the energy can flow from the solar bank to the widget in order to keep it going even longer.
Those that create the best runes, the cleanest runes, the runes made of materials that don't break down, will be the most highly regarded and the most powerful.
What you are really doing with all this is simple considering Magic to be yet another fuel source. You can call it life force, mana, whatever, it doesn't matter. It is just another kind of fuel. We use fuels to make machines do work. The more precise the machine, the better it does the work with the fuel it is given. The better the materials, the longer the machine lasts. Since you are treating magic as fuel, you can logically rule out the perpetual motion machine.
I brought up runes because I have always been a fan of that concept, but you don't have to limit magic to just that. Other books have objects of various sorts that the magic user has around to focus energy in different ways.
In some books there is a distinction between on the fly magic that does not rely on anything being permanent and magic that is simply cause and effect based on the magic users life force. A magician can trow a fireball, but it is powered by his own life energy, it dies very fast as soon as he stops concentrating on feeding it more energy, and after it is out in the world, it has to do business with the rest of the laws of physics. Without fuel and Oxygen the fire dies.
There is no reason why you have to have a world with magic that does not also have technology. You could have a solar powered, rune driven car. It absorbs eneregy from the Sun, channels it through a rune that in turn powers the wheels. Or a gun that is totally silent, that pulls mana from the wielder in order to throw a dart at speeds just under the speed of sound. The wielder would get tired after several shots. Everything else in this world would work just as well. Gasoline burns just as easily, and could be used to power an internal combustion engine.
To be a bit more specific about materials in Magic and how they could work. If you create a rune out of steel, it would work well and last a while, but might rust and degrade over time. The purity of the steel might make it last longer. You might deem pure iron to be a better conduit for the enery short term, but as rust degrades the iron, so too would it degrade the magical efficiency. Create a rune from gold and it would never degrade purely from time, but gold is very soft and can be damaged. Diamond is very hard, but is also brittle. Link your magic into the properties of the material a rune is inscribed in. Spells that are more fire based might best be done in high grade clay or ceramic. Spells that apply force get inscribed in steel. Gold for the very fine workings, diamond for things that must cut precisely, and Granite for something that must be strong and long lasting. Let your imagination play around here. Heck, even pencil and paper for something fast and dirt that doesn't have to last more that a few minutes.
Just so long as you can create a consistent system and then stick to it.