How do you make attrition work in a game where you don't fancy doing all the hard work, and instead rely on official published supplements?
This is entirely the responsibility of the DM. This is why it is not addressed as directly as you would like, although I do think it is addressed by most published products. The reason you don't see the adventures telling you when and where rests are possible is the same reason you don't see adventures that tell you when initiative must be rolled, or reminding you that the PCs can use spells in combat. It's because they expect you to know this based on your understanding of the rules.
Now, the way that you can make attrition matter is to make the decision to rest a risk/reward assessment. The PCs know that they can regain some strength by choosing to rest...so why would they not do it? That's the question.
The first answer is to make rest not guaranteed. It can be interrupted in any number of ways. Yes, you are correct that there are some spells that mitigate these risks...but that doesn't mean they are fool proof. Have an enemy caster dispell a rope trick and the PCs find themselves tumbling down amidst a horde of enemies.
The second answer is along the linea of the dreaded time constraints, but different enough that I'm not afraid to mention it to you. And it's that time passes. Maybe the bad guys hear the heroes are lookin for their base. Luckily, the heroes decided to rest, giving the bad guys time to get out of town, or abandon their HQ. Or get reinforcements. This isn't so much a deadline as it is treating the fictional world like a dynamic setting. If things like this happen to your PCs a few times, it will impact their decision making when it comes to deciding to take a rest or not.
A third option is to string a few encounters together so that there is no time for rest. They happen one after the other without any break. That will make attrition be a factor. Removing the ability to safely rest at will is a big deal. Judging by your desert scenario you described, it seems you're already aware of this, but it never hurts to reiterate.
Plus, there are always time constraints. Yeah, I know you said not to mention this, but I'm not treating it as the catchall method that you seem to think many consider it. If it's one tool in a toolkit, then it's not so arbitrary or forced. And I would not say to add a time constraint where one does not already exist...I agree with you that will seem rather artificial. But I find it hard to beleive that time constraints aren't already in place as part of the story. The published modules all include some forma of time constraints. If there's an enemy force marching on the town....if the wizard is studying the arcane doodad underground to unlock its secrets...if the bad guys are chasing you...if the cultists will strike again...if the vampire bites the girl again....all of these are story elements that contain natural time constraints. Take too long, and there's a consequence.
And that's ultimately the issue...it sounds like your players never face any consequences for resting. And that'd be fine except that according to you, it's not. The rules give you what you need, but it's up to you to make it work for your game and what you want it to do. No one but you can correct the issue. A combination of the methods above will create a variety of impacts on your players decidingg whether to rest or not. No need for mechanics...just choose to use these methods, or ignore them and watch the problem persost.