You can use whatever strategy you like because it's dependent on your mindset but martingale is not too much fun if you have limited bankroll because of it's aggressive betting behavior in order to win but still we all have different opinions in gambling and for some it may work while for others it's the same.
It seems to me an important question is when exactly, at what moment the player decides to stop using some strategy that he uses before the next step in the game and switch to a new strategy or start playing completely chaotically. I think that this largely depends on the character and temperament of the player. And of course, on how lucky or unlucky he is in the next round of the game.
It seems to me that professional players approach the issue of changing strategies in advance, and this change can probably also be called a kind of strategy. But in any case, a chaotic game does not bring anything good, and even more, it is not as interesting as a game with a strategy system that every serious player develops for himself from his own experience or even intuition.
Using martingale is not illegal, because it will make you lose money. Casinos would very much love it if you could use martingale, they would even support you during your tries as well, give you gifts and rewards so that you could keep on doing martingale. The reason is simple, if you do it long enough then you are going to lose.
The chance of you going 10+ loss in a row is not as little as people think it is, you may not hit it right away, but if you keep doing it then you are eventually going to get it. This is why casinos very much like it, it has never been illegal in any casino, because it has never made any casino lose any money at all ever, it has always been a profitable thing for all of them so they let you do it.