Perhaps because hot water is so easily obtainable these days, we think of the figurative hot water, meaning a trouble, a scrape, or a difficulty, as being a modern expression.
No, indeed! People first got into trouble thousands of years ago, though English-speaking people didn’t refer to it as “hot water” until about the beginning of the sixteenth century.
Possibly the allusion was to the ancient way that unwelcome guests were sometimes warded off, by heaving a kettle full of boiling water, when available, upon troublesome intruders.
But, oddly enough, more than two centuries after the figurative use was a matter of record, James Harris, before starting on the great diplomatic career that eventually caused him to be created Earl of Malmesbury, supposed that “in hot water” was a modern phrase of his period, and called it such, in 1765, in one of his letters.