I think Shanks captured Loki but didn't defeat him in a fight.
Loki referred to Shanks as a coward when he spoke to Luffy.
Loki destroyed his father Harald as if it were nothing, the same Harald who wasn't being restrained by Shanks and Gaban.
If we follow the logic that normal humans mature faster, then since that battle Shanks has reached his prime, while Loki, if he were human age, would be around 21 years old currently, still far from his prime.
When Loki killed his father, he surpassed Harald buffed with Imu's contract, while base Harald equaled Xebec.
Eight years passed between Harald's death and Loki's capture.
I don't see Roger reaching Xebec's level, and Loki has far surpassed Xebec.
I don't think Shanks surpassed his captain Roger.