Spanning Tree is under-rated :) Although I read a twitter thread earlier where someone did this and they had spanning tree which in theory prevents this but the switch had some kind of bug causing it to crash and reboot right after disabling the port with spanning tree.
It was a long time ago and most of the equipment was either hubs or dumb switches with no budget to overhaul. That’s a really great bug to have in your equipment out in the wild