Allowing debugging, it still verifies each device that tries to initiate adb connection. Dev options are for minor tweaks the system partition is untouched from these.
Been using Android phones at my home for at least a decade, even rooted phones with xposed and magisk.
Haven't faced any "virus" or security breach yet nor heard of anything like that happening to any friend or acquaintance. Most of the tools are opensource and one can compile these on his own PC.
At most I've faced some annoying ads from websites where my parents allowed notifications(a 2 minute fix to reset chrome permissions)
The phones from likes of Oppo, Huawei, Vivo don't even allow one to unlock the bootloader. And there isn't even point of rooting these as stock roms nowadays have better overall performance/efficiency/features compared to an AOSP based rom which cannot be a jack of all trades.