I removed a dysfunctional "Kitchen in the Closet" from the closet in my den. It had hot/cold water, a washbasin, a refrigerator and a 4 burner stove. An amazing fixture, but useless for me.
I cut off the plumbing drain, glued a cap on it and used the valves to turn off the water. The electric wiring consisted of 3 # 10? wires. I don't think anyone would have a problem with the plumbing.
I cut the electric wires, put wire-nuts over the cut ends, and enclosed it all in a small metal junction box. The junction box and the capped plumbing I surrounded with a small wooden enclosure against the dry-wall.
It looks neat, but how many codes did I ignore? Here are two photos: