I had been toying with this idea for at least 10 years, and had gone all of the way to remove the water heater in the first 25, and then found that the "instant" type of heaters available would not work, because they were not pressure tested. They had an on and off valve which stopped the water before it got to the heater tank.
I had looked at the small tank heaters, specifically the Bosch 2.5 gallon. But it seemed to take up a lot of space under the galley
Micah Curtis of "Sierra" had installed one of the Bosch 2.5 gallons behind the sink in his 25. I made a mock up and it appeared to fit.
I pulled the old tank out. In my boat 2007 C Dory 25 with fiberglass interior, there was a shelf which rested on the top of the water heater, and the heater was its main support. That had to be removed in two pieces. Teak trim along the front of the shelf was removed. Then there was one screw on the hold down in the back, all tubing and electrical had to be removed. In out case the overflow went to the shower sump, so that line had to be removed also.
The new tank went in fine, I decreased the number of hoses under the shower pan to 2 (from 4). I also have a mixing valve in the shower. So the hot line goes to that. The cold line is split between the mixing valve and the cold tap in the shower. I put the water heater at Max temp--and it was too hot for use on the hands. The idea was that the mixing valve would keep temp down to regulated temp. We used the heater for 3 weeks of continuous cruising. It worked very well. The water was warm enough the next AM for breakfast dishes and wash up. The water heated up in 15 to 30 minutes to max temp. There was very little "dead space" between the heater and the spigot.
We went with the same water heater circuit--so I had to run new wire (#12) and I did put in a socket, rather than hard wire, if ever had to remove or work on the heater this is safer. It was a great upgrade.
Water heater installed:
Mixing valve:
I have taken photos of most of the upgrades in this 25 and will be posting that as a subject soon.