Reinforcement learining basics - is it possible to deal with environment with random events
Yes, in general reinforcement learning algorithms can handle random events in the environment. Think about the q-learning update rule
$$ Q(s_t,a_t)= Q_{s_t, a_t} + \alpha \left(r_{t+1} + \gamma max_aQ(s_{t+1},a)\right) $$
But remember $$Q(s_{t+1},a) = \mathbb{E}_\pi\left( \sum_{i=t+2}^T\gamma^{i-1}r_{i} \right)$$
that is the expected value of the discounted sum of future rewards. This handles randomness in the environment quite well and eventually the value will adjust to factor in these random events. In a tabular environment this will always converge to the optimal value function and corresponding policy.
If you know the environment dynamics (which it seems like you do here)
$$ p\left(s', r\mid s,a\right)$$
you can use a dynamic programming method like policy iteration or value iteration to efficiently compute an optimal policy and value function. I recommend looking at the first 4 chapters of Reinforcement Learning: An Introduction by Sutton and Barto (at least chapters 3 and 4). The text is available freely online on their website at their website.