Lockpicking ought to be exponentially hard. You should have to try all the pin position combinations. Something like 5^6 for a 6-pin cylinder. But is in practice, it's not much worse than linear. You can tell when you're making forward progress. That's considered a total fail in a cryptographic system, but is accepted in the keyed lock industry.
The guy with the Stuff Made Here videos did make a lock that is not supposed to let you know if you're making progress. That makes picking exponentially hard again. The info the key provides is recorded mechanically, and then, as you turn the key, that info is later tested with the cylinder in a position that blocks access to the mechanism. That isolation between "read key" and "test key data" is what makes it work. He has an elegant, reasonably compact design, although it turned out to have other vulnerabilities. If you were willing to have a big box of a lock inside or behind the door, like many 19th century and earlier locks, this would be much easier to build.
As locks wear, they become easier and easier to pick. Heavily worn pin-tumbler locks can be opened by almost anything that randomly moves the pins up and down while you apply some tension. Rakes, vibrators, etc.
Many electronic locks are vulnerable due to putting the electronics that makes the decision to open on the outside, where it can be tampered with. You'd think the outside would just have a keypad or sensor, with all the good stuff behind the door, but all too often, no. Also, most electronic locks come with a mechanical backup lock, usually one that's not very good.