
Here is how 3-way wiring works. There are 2 travelers. One is hot and one is not. Any 3-way switch simply swaps which one is hot.

Here's how a 4-way works. It's exactly the same thing, except an additional special 4-way switch is added to the middle. It's hard to convey this in a drawing, but the 4-way either exchanges the travelers, or does not. So one is hot and one is not, and the 4-way swaps which one that is.
If you think for a minute, you realize you can insert any number of 4-way switches. There is no limit. You could have six of them if you want.
And by the way, there is no "5-way". 3-way and 4-way are types of switches (the only types needed). Do not take the number of switches, add 1, and say that "-way". Not how it works :)
The 3-way switch doesn't even know the 4-way is there. As far as it can tell, there's only another 3-way on the end of that line.
So there are two ways to design a smart switch.
Way #1: a smart switch that uses a traditional 3-way at the other end.
In this case, the smart switch has 2 traveler wires that go to a traditonal 3-way at the other end. Or otherwise the smart switch is looking for a wire that is "hot or not". Then, the original 3-way is left at the other end. Pretty easy right?
In this configuration, the 4-ways don't affect anything. They can simply be left in place as-is. The smart switch can't distinguish a 4-way throw from a 3-way throw.
However, if you're trying to free up wires to use the /3 cable wires for other things, this doesn't buy you anything.
The gotcha with this type of switch is you can never put it at a 4-way (middle) location, it must be at an end location. Further, quite often the choice of ends is forced upon you by the wiring. So the master is likely to not be where you want it to be.
Again, this type of smart switch can never, ever be at a 4-way (non-end) location. Sorry.
Way #2: Smart master/smart remote at all other locations
In this situation, the smart switch master requires the use of smart switch remotes at one or more other switch locations. It is able to intelligently communicate with them, and add a much more robust user interface, often the same controls as the master has. That's relevant to a dimmer.
However, the smart switch remotes need power all the time so they can work. That means the wiring is rearranged to deliver supply hot and neutral to all switch locations. (which is also handy if you're trying to extend the circuit for other uses - I often recommend this type of smart switch for that reason alone). Depending on the switch, this can also free up a wire - some switches use wireless or powerline-coded communications, and do not need the 3rd wire in the cable.
However as you observe, these are more costly since you must put a smart switch remote at each switch location instead of a $1 3-way or a $10 4-way.
Typically the smart switch master must be at one specific switch location, but you don't care because all the other switches have a robust controls.
So my advice is to decide which scenario suits you best, and choose that type of smart switch.