I've used powerline gear twice, both for similar applications.
In the first instance, someone wanted wifi in their detached garage at the back of the lot. A couple of randomly-selected powerline adapters and an access point later, and that rig worked reliably for them for over a decade.
In the second instance, someone else wanted wifi in their detached garage at the back of the lot. A couple of randomly-selected powerline adapters and an access point later, and I couldn't make it work at all.
The main difference between these two was that one had power fed from the house's main breaker panel, and the other had power fed directly from the same transformer that the house was using but it had its own service entrance (and meter).
This anecdotally suggests it can work, and that security is inherently enhanced by not allowing the neighbors to poke at it at all (if I can't use it because there's a transformer on the loop, then the layperson next door can't use it either).
However: At my own place with my own detached garage at the back of the lot, I just use some fairly minimum-effort wifi. I've got a Mikrotik access point in a central spot in the house, and another one in the garage that acts as both a wifi client and a wifi access point (and an ethernet bridge).
Works fine. Speeds are in the >100 megabit range in both directions, which is a whole fuckton of bandwidth for anything I intend to do out there.
If the garage were far-enough away, I'd enhance this by mounting the requisite mikrotik hardware on the outside walls instead of the inside walls. If the garage were way, way out there, then I'd use different mikrotiks with directional antennas to backhaul, and additional radios indoors for wifi coverage.
If I had more than one outbuilding, then I might use a one-to-many topology with an omni at the house and directional antennas on the outbuildings.
(I made an extra SSID that was just for the garage to keep the dumb devices out there from wandering onto the house's access point for whatever dumb reason they elect to do that, but meh: They'd still do dumb shit like that even if I were to string fiber.)