DM rule #1: ALWAYS make your players believe you did it on purpose.
"That +3 sword you found? Oh yeah, I wanted to check how a 5th level party can handle an adult dracolich, but I didn't want you guys to go in completely outmatched... Here, look, I brought the miniature..."
DM rule #2: Every problem can be solved with psychological warfare.
After the above comment, drop some rumors about a huge skeletal winged beast roaming the landscape. Maybe they come across a village where everyone refuses to leave the house because little Timmy saw something fly by and steal Bertha (the beloved family cow)
Once they forgot about this, have them fight a skeletal cow.
... and so on. Your PCs will never feel cocky or overequipped if deep down they're afraid you'll throw something too big and nasty at them at some point, even if that won't happen for a few sessions.