In most countries, if you are not a tax resident, you will not pay taxes there on any capital gains (and often also interest and dividends) there, though there is often some minimum withholding tax for dividends. It is possible to not be tax resident anywhere and therefore to not pay capital gains taxes. See, for example, this question in Taxation magazine:
In fact, it is not unusual for very wealthy individuals to arrange their affairs so that they are not tax-resident in any jurisdiction. UK residence is a simple question of fact. If Rod’s clients do not meet the statutory residence tests set out in FA 2013, Sch 45, and as explained in HMRC’s guidance RDR3, they will cease to be UK resident. There is no obligation to become resident in another country to cease to be UK resident.
However, you would need to make sure that you are, in fact, not tax resident anywhere. The article notes that the UK does not require someone to be tax resident somewhere else to end UK tax residence. That may not apply to all countries. And although I wasn’t able to find examples of this during a quick search, it is perfectly possible for a country to have a rule that you are tax resident in that country if you have closer ties there than anywhere else and you are not a tax resident in another country. You might need to consult a tax advisor in countries you visit to make sure you do not become resident there (despite spending less than 183 days or whatever the local physical presence test is).
If you are not a tax resident anywhere, you will probably also not be able to benefit from most provisions of double taxation treaties, which could cause tax problems both for earned income and for things like retirement income.
I would also suggest that you study more carefully what it means that “most income is taxed at source” when it comes to cross-border services, as your assumption that “employment will be taxed based on contract” may not be correct.
If I am a consultant doing living and doing work in country A, for a client in country B, the income from that engagement would usually be taxed in country A; A is the source of the income because the work is performed there. If country A is the United States, that income would be “effectively connected income” and taxed in the US.
Now, country B might also claim that the source of the income is in B, for example if you traveled to B for business meetings to plan the work, so you would need to study the rules for both A and B. In more reasonable countries, mere meetings for sales or project planning do not trigger tax liability. And you might not be able to benefit from any helpful provisions in the double taxation treaty between A and B. (Or you may be very lucky and country A does not tax casual remote work that is connected to another country. I have seen other answers suggesting that Mexico deals with telecommuting in this way.)