Genuinely truthful answers to most questions about shotguns begin with the same two words - "It depends... ."
A reasonably truthful answer to your question(s) would be, it depends on the shotgun/barrel/choke/load/shooter. I know me, my gun and my chosen loads. I'm afraid I don't know you or yours.
I know that with my favorite 870, with its 18 1/8" factory CYL bore Police barrel, I'd not worry at all about my favorite load of 00 buck (Federal LE 127 00) patterning at 25 yards, because it shoots consistent patterns into about four inches at that range. And it will penetrate more than adequately as well at 25 yards. I'd be willing to push it to 40 yards if I had to, if I didn't have to worry about pellets missing the target. Beyond that, I'm switching to slugs (Brenneke KOs). And wishing for sights and not the plain bead that particular barrel wears.
A single pellet of buckshot might well kill at 100 yards or more, but shooting buckshot beyond the range at which you can keep all your pellets on the intended target might mean you take out a target you didn't intend to hit. Several good shotgun instructors out there remind their students that every buckshot pellet on its way downrange has a lawyer attached...
Once upon a time I tried to get a shotgun to work with buckshot all the way out to 100 yards. I could get from three to five pellets out of a 10-pellet load of 3" magnum 000 buck into an Army E type silhouette target at 100 yards, and the pellets easily penetrated the 2X6" pressure treated boards that made up the target frame. That was as far as I ever pushed it, and that was with an 18 1/8" Remington factory barrel that had been fitted for choke tubes, had its forcing cone lengthened and was wearing a $75 PatternMaster choke tube. Unfortunately that choke tube also precluded shooting slugs, so I decided I'd rather have the versatility and gave up on that particular avenue.
As to #4 buck, or 0, I don't use them. I'd have to do a good bit of patterning at different ranges before I could know what any given shotgun/barrel would do with a given load. And I'd have to do some penetration testing as well, especially with #4 buck. While it might do well at closer ranges, I'd expect it to run out of penetration sooner than the bigger heavier pellets would.
It might be difficult to establish a legally defensible reason for shooting buckshot in a claimed defensive encounter at ranges much further than household distances. That would depend on individual circumstances. Here, we live in a very rural area and law enforcement response times vary from slow to never. A shotgun is likely to be the go-to long gun here, so I've tried to establish what can be done at longer ranges with it. For example, it's 51 yards from our front door to our driveway gate here. That's slug range as far as I'm concerned.
Don't know if this ramble helps answer your questions or not, but it's the best I have to offer.
lpl