I'm wondering whether a trap should be considered an encounter and how should they be rated in terms of easy/medium/hard/deadly.
This is not a question about whether traps should award PCs experience, but about how they factor into planning the adventuring day as a whole. For example, should a corridor with a dangerous trap be considered a hard encounter?
It does have the potential to use player resources, from healing potions to recover lost HP to spells to avoid or disable it. On the other hand there are no clear guidelines about estimating difficulty: the DMG lists them as setback/dangerous/deadly. I'm inclined to say: Setback = Easy/Medium, Dangerous = Medium/Hard, Deadly = Hard/Deadly but that's just a hypothesis.
Related questions:
I've found this question - How do traps affect encounter design budgets? - but it's about adding traps within an encounter, not having only traps as an encounter (and it doesn't seem very precise). My question focuses on how a trap-based encounter can be accounted for when calculating the overall XP budget of the party for the purposes of an overall adventuring day.
There's also this question - How should I award XP for traps? - but it's about actually awarding player XP, and the answers focus about whether and how (milestones/non-combat) XP should be awarded, not about estimating the difficulty of the trap in terms of easy/medium/hard/deadly encounter.