<p>I'm trying to figure out if it's worth buying a 3D printer or using an online printing service like e.g. <a href="https://treddy.it" rel="nofollow noreferrer">this one</a> in the long run. Anyone have any cost analysis?</p>

It depends
If it is worth to invest in a print made for you compared to getting a printer depends on the needs you have. Thee can be informed by the type of material you want to print and the requirements that has on you. Let me give you some examples when it is simply worth it to pay:
A metal printer costs in the thousands: upper five-digit for the most baseline and
averaging in the low to mid-6-digit
. Ordering a single or few printed pieces will be economical, and even ordering
many
parts will still be well below break-even, considering that the material sets you back by up to 600 \$ per kilo!
A nylon powder printer
starts in the middle 4-digits but easily goes up to upper 5-digits and even middle 6 digits
. Ordering for a small-scale production this way still will be economical.
Some specialty plastics need printers with very high-temperature chambers and hotends with extreme wear resistance. Such machinery can easily cost five digits, especially in large dimensions where it goes to six. Compared to purchasing price of the machine, ordering the part will be cheaper.
On the other hand, getting a printer gets cheaper once you:
use it sufficiently, for example, to iteratively modify a designed part or produce a medium variety of parts.
have the time and money to spare to learn and tweak your machine to do what you want.
the amount of parts you want to make would cost you more to have ordered than a new printer, or a substantial portion thereof. For an FDM machine, the first useful machines can be priced as low as 150 \$, while 300 \$ gets you a somewhat capable Ender 3 v2 - which has developed into some kind of
standard unit
for printers.
Also note, that some printing services have limits on what they will produce. Commonly they will not provide services to manufacture tools or items that might violate local law or make it trivially to do so, for example copying keys or even manufacturing Keyblanks.