In addition to the details provided in Geato's response, there are a few other design elements to keep in mind when making an IoT device with extremely long battery life. Also, I would highly recommend calculating out your theoretical power consumption and battery life before you start designing a board. Hope this is helpful!

1. System Level and Power

As Gaeto mentioned, the key is to ensure that the system is in deep sleep mode the majority of the time. This requires control over the MCU and wireless radio power states.

While you can have two serparate MCUs, where an ultra-low power MCU like the MSP430 FRAM series (<1uA in RTC deep sleep) monitors the sensor and then powers on the rest of the system, this is likely overkill for this application.

Additionally, a critical component of ultra-low power systems is power managment. It is critical to choose a battery with low leakage current (your best bet will be a primary battery) and a regulator with low quescent current. When in deep sleep mode, the power system will often draw the largest percent of power.

I would recommend either 3 AA batteries since size is not a constraint or a Lithium Manganese primary battery (CP505050, 3000mAh). For the regulator, focus on choosing a low Iq and a low input voltage. The TPS62740 is one option having 360nA quiescent current, input range from 2.2V to 5.5V, and is not a BGA package. Be sure to choose your rail voltage to minimize the power consumption of the MCU and wireless radio as it changes based on voltage.

2. MCU and Wireless

As an alternative to the ESP family, the CC3220MOD from TI has 1 uA shutdown current and is readily available from standard suppliers. This has an dedicated ARM MCU for the wireless protocol which can be shut down, and an application MCU to facilitate low power operation. TI also provides many examples for working with this module.

3. Alternate Sensor Design

In addition to the design provided by Geato, one can use a capacitive sensor (essentially the same as a capacitive touch sensor) to detect water. It will not be as low power as Geato's solution, however the significantly fewer parts will be used easing implementation, debugging, and testing.

4. Direct Answers

Which microcontrollers would you consider and why?

I recommend the CC3220MOD from TI. You can use TI-RTOS or Amazon FreeRTOS to easily integrate with the cloud.

What peripherals would be needed, which ones would you recommend?

No specific peripherals are needed if Gaeto's circuit is used. The only peripheral needed is to support the water sensor. Keep it simple

How would you proceed for prototyping? (eval board?)

Depending on budget, you can use the SimpleLink Wi-Fi CC3220SF Wireless Microcontroller LaunchPad for prototyping. Once you have a proof of concept, I would create a custom PCB. To keep things simple you can also create a Shield for the LaunchPad to minimize the amount of development required.

Where would you buy the parts needed for the prototype?

Mouser, Digi-Key, or the TI Store. Get the PCB from OSH Park and a stencil from OSH Stencils.

Main challenges envisioned?

See above. In addition to the aforementioned challenges, actually achieving a low level of power consumption when in sleep mode is non-trivial. You should set up an INA based current measurement system for measuring low-currents rather than using a DMM.

For the cloud infrastructure, you can use the AWS IoT service for a really simple way to receive notifications via text or email. It is surprisingly simple to setup and quite inexpensive.