> 4 - Buy and colocate the hardware yourself – Certainly the cheapest option if you have the skills, scale, cap-ex, and if you plan to run the servers for at least 3-5 years.
Is it still the cheapest after you take into account that skills, scale, cap-ex and long term lock-in also have opportunity costs?
That is why the the second "if" is there.
You can get locked into cloud too.
The lock in is not really long term as it is an easy option to migrate off.