Bitcoin miners use a complex algorithm
If by "complex algorithm" you mean
SHA-256, then it is not so complex. In fact, many altcoins, which are based on Proof of Work, use much more complex algorithms. In general, the faster a given hash function is, the easier it is to run a non-mining node, SPV node, or any other user-based client (which means, that many "ASIC-resistant" altcoins are also "user-resistant", if their hash functions are too complex, because then, chain verification is more costly, than it should be, if for example checking 10k blocks is as hard, as mining a single block). And SHA-256 is not so complex: it is only a little bit of math, executed in a loop, and designed to rely on avalanche effect, on
Merkle–Damgård construction, and on ARX model (Addition, Rotation, Xor, combined together). Some topic about hash function complexity, where SHA-1 is analyzed:
https://bitcointalk.org/index.php?topic=5402178 (here, SHA-256 is very similar, there are different constants, and some math operations are changed here and there, but if you can understand SHA-1, then you should also understand SHA-256).
If this ever happens, will Bitcoin be able to survive in the market?
It is technically possible to make Proof of Work scripts. For example: "OP_SIZE 60 OP_LESSTHAN OP_VERIFY <pubkeyToBeBroken> OP_CHECKSIG". Instead of 60, different numbers can be used, to set a difficulty for moving a given coin. Which means, that even if the main chain stops, then still, a chain of unconfirmed transactions can still be protected by additional Proof of Work, chosen by users, and then, the chain of signatures can still move forward, even if Proof of Work won't be present in block headers, but in transaction scripts instead.
Currently, I don't know how to combine it with existing block headers, so it does not use Merged Mining, but future Script updates, like OP_CAT, can make it possible. But even in today's code, you can protect your scripts with additional Proof of Work, which means, that you can have a chain of unconfirmed transactions, that is hard enough to overwrite, even if ASIC miners are gone for whatever reason.
And does Bitcoin depend entirely on miners?
No.
Bitcoin is not ruled by miners. And there are many good reasons, why everything shouldn't depend only on miners. For example: if all miners would decide, that instead of halvings, there should be doublings, and the basic block reward should explode from 50 BTC, up to 21 million coins per block, would you use that coin, even if it would be covered by a lot of Proof of Work?
do you think there would be a chance for illegal transactions to occur if mining were to stop?
As long as nobody will find any bug in the code, like it was during Value Overflow Incident, no honest nodes will ever accept some invalid transaction. If you have a lot of people, running similar, or at least compatible code, then they form a community, focused around a given coin. In case of disagreements, they are currently solved by miners, by telling you, which history is correct. But: each full node checks everything, so you cannot just send some completely invalid transaction, and expect it to be accepted by another party, if you don't know any serious bug in the code, which could allow such things.
So: if you have two or more valid alternative chains, then miners can tell you, which one is correct. But: they can only pick between equally valid ones. They cannot generate random bytes, and expect it to be accepted. Every signature should be valid, every script should follow consensus rules, and you can only confirm another alternative valid chain, which means, that attackers can probably focus on just reversing their own transactions, because it is the easiest attack vector, if you have all private keys for transactions you want to change.
But imagine what will happen to Bitcoin if Bitcoin mining is completely stopped?
Then, the chain will halt. And then, users will be forced to pick some software, which will allow them to transact. Which means, that collective effort to produce the next block, will eventually push the chain forward.
Basically, mining exodus will just expand the time of the block from 10 minutes, to something much longer, depending on how much the hashrate would drop. Which means, that if 50% of mining hashrate will be gone, then you will have just 20 minutes per block, but the chain will still move forward. Which means, that even if we would have 99% of hashrate gone, then you can still expect to see something around one block per day (because we have something around 144 blocks per day).