Is there solution for event where nobody would mine some coin?
The chances of that happening is next to impossible. Miners get rewards for mining because of the mining fees. And the incentive is enough to keep miners motivated, and judging from the high fees some people paid post-halving, I don’t think many miners would be giving up any time soon.
OP this topic has been discussed at length so many times before. Just use the forum search engine and search for questions like "what happens if all miners quit” or “what happens when the 21 million bitcoins are mined".