And this is only for a 1D cake. In the real world cakes are 3D. I wonder how much worse it would be.
Actually for round cakes you could even make normal (wedge-shaped) pieces by re-parameterizing distance along the line as angle and cross sections as infinitesimal wedges.
Edit: And for the rectangular cake you could slice the cake up along one axis and line those pieces up end-to-end first so that the cross sections would have a reasonable width instead of having slices as wide as the whole cake
Making multiple cuts along a line doesn't seem optimal. Remember that these slices of 3D cake can be of any shape. You can imagine different people liking different fillings or different toppings on the cake.