There will of course be infinite different ways for wallets to calculate fee estimates and some may prove more accurate than others, but in the case of tokens which are often used to pay for tx fees, looking at recent on-chain data should prove to be a sufficiently effective method.
What's important is how block producers will choose which tokens they're willing to accept and at what rate. To that end, we've developed a "price server" software which nodes can use to connect to an external data source such as a CEX API or a DEX Oracle such that they can designate a reference unit, calculate the prices of different assets in this reference unit (and apply weights/multipliers depending on factors such as liquidity), and update their list of accepted assets and rates accordingly.
if it is some illiquid shitcoin, there may not me a market rate
That's exactly right. When transferring an illiquid shitcoin, you may also need a more liquid token to pay tx fees with. In such an environment it is obviously very important to be able to bump transactions that get stuck due to the proposed asset, and even change the proposed tx fee asset using RBF - we've implemented a way to do that and it's shown in the demo!