You can have a socket 3m from the shower or bath and is has to be installed out of the out of the zone, less distance to play with and it must be a fused spur connection, obviously backed up with an RCD/RCBO. I’ve seen plenty in bathrooms housed in purposely built cupboards.