There are grades of PEX designed for direct burial and use in applications where one would use hard PVC pipe. But you have to know what you’re using. Also, connections matter A LOT. I would only use expansion type connections with direct burial, no crimps or push-to-fit nonsense. PEX is a shape memory material meaning it can be expanded by very large factors but will “remember” it’s original shape and go back to that once the applied force is removed. This results in hundreds of PSI of clamping force around a connection nipple which is next to impossible to develop leaks. Crimps, clamps, and “shark bite” connectors can’t come even close to the forces developed by a shape memory expansion fit. It’s also the only connection type that’s approved for direct burial and set-in-concrete applications.
Yah, I probably got a few things wrong. Maybe this will prove to be one of them. I didn't know about PEX grades. But I wasn't dumb enough to use push fittings anywhere, so there's that. I used crimps everywhere, including underground. Well, technically there is only one crimp underground, right at the meter. I used an unbroken length from meter to house, so there's nothing but PEX in that entire run. It's encased in PVC. Is that still considered "direct burial?" It's not actually exposed to the dirt. Well, at least 98% of it isn't.
I can't now remember how I connected the PEX to the copper that comes out of the dirt (to which I connected the main valve and the pressure regulator. I think it curves from horizontal to vertical, then I probably crimped something to adapt to copper. If it fails, it'll be at one end or the other, relatively easy to dig up.
I probably saved $20K doing it myself,* so if I have to pay for some water spilled a couple times, I can live with that. It's not my home, so if it lasts until I sell the place:
Come to think of it, based on how badly I estimate construction costs, it might be double that. I did all the plumbing, rough and finish, I did all demo and all the sheetrock, taping, texturing and painting (to access running all the pipe). I built a distribution manifold complete with four independent water meters (I got kudos for that from the inspector). I'm usually off by 100% or more. How much would it have been for a plumber, rocker and painter + a general to 100% replumb a four-plex and replace every fixture (four full baths, four kitchens)? I think total materials were around $3K. So maybe I saved $37K+? I can fix a lot of mistakes for that!
The jury on PEX for my water main is still out, but it sounds like they've got a verdict for under a pool.