Electrical turning off on its own
A short circuit is a fire hazard, though it may not require rewiring the house to repair. When this happens, identify all affected outlets and lights.

Then, when the circuit is normal, locate section of wire that must contain the fault by separating the line and load at various points to map out the circuit. When you disconnect the hot at one point in the circuit and turn the power back on, everything that doesn't have power is part of the load from that device, and everything still working is part of the line.

With the process of elimination, you can identify the 2 outlets where only the problem outlets are affected when the hot is disconnected, one outlet that has the problem itself, and another that doesn't have the problem. The fault will be at one of these outlets or the line between the two will need to be replaced.