I believe there are quite a few distinct points to make to properly answer the question. @QueensKnight already adressed the "playing in a lost position" part of your question, so I'll focus on the "luck as a strategy" part.
1) Strategy hinges on reducing unknown or uncontrollable factors
When making a plan to achieve a certain goal (in chess or in life), it's important to make sure that it can be relied on at any point, otherwise there would be no point in following it. Often, it's impossible to guarantee the result because some factors escape our knowledge or our detection, but despite that minimizing such factors remains the best way to improve the strategy, by reducing odds of undesired outcome from unexpected events.
In stark contrast, relying on luck takes the exact opposite approach : decide nearly nothing to achieve the goal, hoping to reach it through favorable coincidences. Whether a good thing or not, it's clear that following this pattern is too different from a strategy to be called such.
When two persons play a game of chess, every move has always predictable impacts on the board. Pieces always move the same way, and capture the same way, pawns promotion condition and choices are the same, checkmate is always an inescapable check to the King, and so on. Furthermore, no information is hidden from either player : they see both their and their opponent's pieces at any time, see every move, and can contemplate their position as long as their clock time allows before the next move.
So under these conditions, there is simply no place for luck to occur inside the game, as there's neither random elements, nor unpredictability from lack of information. Hence, it makes little sense to play random moves when, at least in purely theoretical conditions, it's possible to analyze every variation down to their final result to give them as objective an evaluation as possible.
3) Playing the game or playing the player?
There is however one crucial factor that decides how a game of chess proceeds : both players. Chess is not an abstract thought experiment, but a concrete event shaped by the players. Of course, humans and machines alike have yet to solve chess, and even then it's not trivial to approximately evaluate a position at any level (depending on your error tolerance). This means that both players must carefully analyze the board to find which move they prefer, when they could play any move at all.
This gives room for outcomes that would defy the logic of "both sides play perfectly". Here are a few examples :
Loss of focus : One player misses a possibility in a deep variation because they failed to consider it at all.
Exhaustion : After playing for hours, a player cuts their evaluation short because they're too tired to think further (the risk of erroneous conclusions would be too high).
Overconfidence : A player doesn't deem it necessary to analyze a position further, because it appears good enough at first glance, or because they believe their previous analysis, despite not being exhaustive until the final result, is still valid and isn't worth updating.
Distraction : An event happens outside of the game that catches the player's attention (could be as simple as thinking about lunch), interrupting their thought process; when they resume their analysis, though it's not always the case, they might forget some important detail they had uncovered earlier.
And so on. Because the execution of each move in the game isn't guarantee, if only from the psychological side, and because it's not realistic to guess the opponent's mind (chess would be quite boring otherwise), there's room to believe the opponent could slip up for such reasons, which is what "being lucky" in chess really means.
There's no luck in the game of chess itself, and even if there was, counting on it rather than doing everything possible to reduce losing odds can't be qualified as a strategy. From this, I'd say that luck cannot work as a strategy. However, it's not possible to tell either what's the opponent's state of mind (outside of very obvious clues), so there's always the possibility that they could make an uncharacteristic blunder for a variety of plausible, human reasons. Which means luck plays a role at the human level.
So it's true that that as long as you play, there's still at least a small possibility to win, while resigning will always be a loss. Still, no matter if there's the slimmest of chance for such a "lucky win", remember that it's not only out of your control, but there are the same chances that you could be affected by it in the opposite way get an "unlucky loss" (I know I've had my fair share of blunders that I'd readily qualify as such on the mental aspect). Is it worth spending time moving pieces hoping for the best then?
I'd suggest, when you're in a lost position and willing to play further, instead of just hoping for a blunder from the opponent, to try your best, keep a positive attitude, and hang on in the game. Sure, the opponent might still blunder, but they're far more likely to play well until the end (and the gap for this likelihood widens with the player's rating). But a very important thing in chess aside from winning is learning. Try to survive as long as possible after a big mistake. Try not to make another. Pay attention to the board and your mindset. If your opponent could mess up and lose the advantage if they don't find the one good move in a certain variation, try it out (forcing them to demonstrate their ability at converting an advantage, see @QueensKnight 's answer). Just do your best and learn from it. This will 100% be more valuable than simply hoping for a "lucky" outcome.