There are no WotC-released rules for this that you aren't already (per your Question) aware of
I've gone through all of the Unearthed Arcana and all the rulebooks and no such "get more cantrips instead of spells" variant rule exists.
The ways released by Wizards of the Coast to acquire more cantrips than your class and class features would naturally give you are Multiclassing, Feats, or starting play as a race that gives you a Cantrip such as a High Elf or Tiefling.
There are variant rules to allow you to cast more low level spells (see DMG288), but those aren't what you are looking for.
As DM, it is entirely in your wheelhouse to invent rules to allow players to 'learn' new Cantrips. There are a few different ways I have seen this conducted. Unfortunately, I have not played with any of these rulesets, so I can't speak to how well they work in-game. But, hopefully, this will give you some ideas if you want to take the plunge into homebrewing up rules.
(Disclaimer: I don't remember where I saw each of these first, so I can't give you the original source)
Spell Preparing Casters can Prepare Cantrips
The gist of this rule is that it expands the rules for preparing spells to include Cantrips. Thus, for Clerics and Druids, they may prepare up to their 'known' number of cantrips each day, choosing any cantrips from their spell list. The Wizard works much the same way, but must have these Cantrips in their spellbook (they 'add' a new cantrip automatically any time their 'known cantrips' count increases--and can add new cantrips to their spellbook from spellbooks and scrolls as if they were 1st level spells).
Downtime to Learn Cantrips
Using the 'Research' (or referencing the 'creating a magic item' rules if you want it to be harder) Downtime rules from UA and, now, Xanathar's Guide I have seen homebrew rules that allow any caster who can cast Cantrips to use Downtime to learn a new Cantrip.
You can learn extra Cantrips as 1st-level spells
This rule essentially means that any Cantrip that you don't know as a Cantrip can be learned and treated like a 1st level spell. It isn't a spell you can cast by rote at this point, and thus consumes a Spell Slot, but it does give you access to Cantrips you wouldn't have otherwise. Paired with the Spell Points option on DMG288, this could let your players cast them a LOT as they get higher level.
I've seen a small variation on this where it suggests that every time a player casts a Cantrip as a 1st-level spell, the DM should roll a d100 or something...and on a 00, the player has 'mastered' the cantrip, and adds it to their list of Known Cantrips
Your own Suggestion...
If you want to permit a player to 'give up' a learned spell in exchange for another cantrip, then go for it (i.e. a Sorcerer should learn a new spell, but you allow them to learn a new cantrip instead). This is actually rendering the character a bit underpowered because spells are, naturally, more potent than Cantrips.
As mentioned, there are no WotC-released rules allowing you to gain more cantrips outside of Multiclassing, Race Selection, Feats, or the Cantrips (and at-will Warlock Evocations) granted by your class and class features. But, if you want to take the jump into Homebrew-land...hopefully these ideas I've seen around the net will help.