A step up from waterproof liners, which can get damaged over the years, would be pressure-treated wood to resist decay when used outdoors.
https://cen.acs.org/business/consumer-products/What-is-pressure-treated-lumber-how-does-it-forestall-decay/100/i9
(above, and many more, found with...