Start by checking the two receptacles for back stab connections.
I agree with KB, it has all the symptoms of a loose (loose/open, not shorted) wire, on and off with temperature changes, overheating, etc. Start at the panel and check for loose connections. May as well cut the power and check all hots and neutrals/grounds while you're in there. Tighten as needed.I'd be willing to bet that you have a loose connection in the circuit.