sweeping is going to be tough, even if you get the spline type and division right to closely follow the shape, the cross section of the tube gets bigger as it goes around the corners (compared to the straight parts) so it won’t be wide enough in the corners. A rail spline would not help, you could make the scale bigger in the corners but that would make the entire cross section bigger and it would thicker, not just wider, at the corners.
A Loft using circles in Ellipse mode could work since you could increase the width of the ellipse without making it thicker.
Other than that…