What happens if the two players are from two allied towns? Or from a town and it's suburb?
What happens if the hideout is discovered by someone without a town?
What happens if a player who knows about the hideout leaves to join another town?
I'm more inclined toward this idea: the player who found the hideout keeps it secret. If a second player finds the hideout, then that hideout is compromised for both players.
By using my idea, each job site will have a hideout nearby. That hideout can be undiscovered, or discovered by $playerX. When playerY discovers an already discovered hideout and compromises it, the state of the hideout returns to "undiscovered".
And I'm against the instant energy boost - it can be abused by staying in the hideout repeatedly for a short time. Better if it gives the same energy/health as a level 2 hotel, and the protection from duelers.
A hideout at the location of a popular job (like beaver trapping, silver mining, building windmills) will be compromised more often, and those less popular (picking tobacco, tending pigs) less often.
If you see in the saloon someone who "is asleep right now", but you see it at the location of a job (obviously in the hideout), you can go work that job until you find the hideout, to compromise it.