Installing a plug socket under a kitchen sink can be safe if done correctly. BS7671 wiring regulations, such as regulation 132.12, require sufficient space and accessibility for installation, testing, and future maintenance of electrical equipment. Therefore, placing a socket where it might later be obstructed by pipework would breach these regulations. While the area under the sink isn't typically wet, unforeseen leaks could pose risks. However, this risk is comparable to potential leaks affecting other sockets in the home. Proper installation and adherence to regulations are essential to ensure safety.
You can read more about this in our article here: https://www.electricalfaultsfixed.com/blog/socket-outlet-under-sink-electrical-near-water