Given the time's that we see Transwarp Beaming work, it seems to only work really well / efficiently if you have a Transponder or Transceiver to pin point your exact location and know that there are no Spacial Weather Patterns or Environmental Effects screwing with your signal path.
Look at when scottie tried to beam Kirk onto a Moving USS Enterprise, they ended up in the Water System.
If Scottie was off a bit more, he could've accidentally beamed them into the walls like we see in ST: Picard.
Where-as when Kira was kidnapped in the episode "
Covenant", the Pah-Wraith worshipping group hid a Homing Transponder inside a necklace that was given to Nerys. That allowed them to (beam her out / kidnap her) at long distances.
https://memory-alpha.fandom.com/wiki/Transwarp_beaming
The energy output for beaming so far out is ridiculous that it's not practical and more practical to take the ship to the destination and just beam down from orbit.
They did beam that Romulan from the Alpha Quadrant to the Delta Quadrant, but the major issue is that the Romulan was from the past.
So it is theoretically possible, but you need to establish a reliable communication network chain across the Galaxy, like the Hirogen did and pray that there are no "Hardware Failures" when transporting people's signals across the network.
Also, hope that your vessel is within range of the network.
What you should be more afraid of is that Borg Cube in Picard S1 that had the "Spatial Trajector" in the queen's chamber.
Imagine if 'The Borg' didn't limit the "Spatial Trajector" to be a emergency escape method, but a long distance infiltration and assimilation tactic.
You only need to be a few ly's away from your target planet, gather up lots of drones ready to beam across the target planet in all the major citiy centers.
Then start sending out squads of drones into each major city center to assimilate a planet.
That's the REAL scary part you should worry about.
Imagine going about your daily life, and a squad of Borg Drones pops into your city and starts infecting everybody to make more drones, eventually trying to assimilate the population of your planet.
That is the REAL nightmare scenario that I fear the Borg will use.
They don't even have to be that close to a planet, just fly close enough, or turn on cloaking fields, then beam in Drones to assimilate a population.