Or could I use something like these two in combination?
View attachment 128246
That should work. The power rating of the wall charger and the power rating of the 5 V to 12 V adaptor must both be larger than the power rating of the water pump.
It is a convoluted way of doing it, but it uses cheap, off the shelf components and it should work, so it is probably the best solution. I would not advise trying to make something that fitted into a 1" gap and works with mains voltage. That is very difficult.
I wouldn't worry about the fact that you are converting voltages twice. When someone plugs an inverter into the 12 V accessory socket in an electric car, and runs a laptop from that, which happens all the time, the power conversion path is really complicated. It's something like this:-
DC-DC converter in car
400 V dc -> inverter -> 400 V ac (high frequency)
400 V ac -> transformer -> 12 V ac
12 V ac -> rectifier -> 12 V dc
Plug-in inverter
12 V dc -> inverter -> 12 V ac (high frequency)
12 V ac -> transformer -> 180V ac (high frequency)
180 V ac -> rectifier-> 180 V dc
180 V ac -> inverter -> 120 V ac (60 Hz)
Laptop power supply
120 V ac -> rectifier -> 180 V dc
180 V dc-> inverter -> 180 V ac (high frequency)
180 V ac -> transformer -> 20 V ac
20 V ac -> rectifier -> 20 V dc for laptop
And then the laptop will do further voltage conversions because it will charge its battery at some lower voltage, and the electronics will run from a variety of other voltages.
It is really complicated, and of course it could be simplified, but the components used are there anyhow, or are cheap and readily available. The DC-DC converter comes in the car, because most of the electronics in an electric car come from combustion engine cars with 12 V supplies, and you wouldn't want 400 V supplies going everywhere in a car anyhow. The laptop power supply comes with a laptop to run it from the house outlets. The plug in-inverter is useful for lots of things in cars whether or not the car has a 400 V traction battery, so it is a mass-produced, cheap device.