Brachylog, 1616 15 bytes
~c~c₃↺{~jʰ|↺~jʰ↻h&~j}c↰|ʰ↻c↰|
Try it online! (Times out if the output is longer than 7 characters.)Try it online!
Explanation
I wouldn't be surprised if there's a better way to do this.
~c~c₃↺{~jʰ|↺~jʰ↻h&~j}c↰|ʰ↻c↰|
~c ~c₃ "Unconcatenate" the input string into some list ofthree substrings
{ ↺ } ApplyRotate thisthe predicatefirst element to the list:end
{ }ʰ Apply this predicate to the EITHERnew first element:
ʰ h& Assert Takethat theit firstis elementnonempty
~j ~j Assert that it consists of a substring repeated twice,
and return that substring
| OR:
↺ ↻ Rotate the firstfinal element back to the endbeginning
~jʰ c Concatenate the Samelist asback abovetogether
↻ ↰ RotateCall the finalmain elementpredicate backagain toon the beginningresult
| If that predicate succeeded:
cthere was no way to Concatenatepartition the listinput backstring togetherthat
↰ Call the main predicate again onsatisfied the result
| Otherwiseassertions, return the input unchanged