YES! That is absolutely dangerous!
I guess this was not a property sale ( which would have one or more technical inspections as condition of sale most likely ) but a rental?
I personally like to see a lot of separation between plumbing and electrical work, and especially for a panel / fuse box, there are rules about access and clearance. It tends to be only a matter of time before there is a leak in with the shower drain, water plumbing, over flow incident in the bathroom. And, that hole in the ceiling lines right up with ... plus the various little joints are also something where drips can be shed ...
Now there could be a difference in the UK ... but in NA, the positioning is a no - go.
3ft x 3 ft x 6 ft 6 height clearance rule, and nothing else above the panel + 6 feet ... or anything that could be wet, leak, etc needs counter measures ( drip shield, flashing, ... ) to protect the electrical equipment from leaks, dripping water, ...