What you are trying to do will never work, find another way :) see the graph protocol or other resources that work to index the blockchain.
Back to the Question:
There is a difference between from, to, value in the transaction and the from, to, value in the logs included in the transaction receipt
web3.eth.getTransaction('0x9fc7641.....').then(console.log);
{
"hash": "0x9fc7641...",
"nonce": 2,
"blockHash": "0xef95f2...",
"blockNumber": 3,
"transactionIndex": 0,
"from": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"to": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
"value": '123450000000000000',
"gas": 314159,
"gasPrice": '2000000000000',
"input": "0x57cb2fc4"
}
Here from: is the transaction sender, to: the contract address (could be another contract and not the token contract) and the value is the amount of ether in Wei.
And
var receipt = web3.eth.getTransactionReceipt('0x9fc764...').then(console.log);
{
"status": true,
"transactionHash": "0x9fc7641...",
"transactionIndex": 0,
"blockHash": "0xef95f...",
"blockNumber": 3,
"contractAddress": "0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe",
"cumulativeGasUsed": 314159,
"gasUsed": 30234,
"logs": [{
// logs where the emitted events are shown
}, ...]
}
If the Token is ERC20 then in the logs you will see a Transfer event which includes from: the old owner of the token, to: the new owner of the token, value/amount: is the amount of token that is transfered. (ignor the "contract address" it is only shown if a contract is deployed in the transaction)
So long story short, if the user interacting with the contract directly and not through routers and others contract then you need both. The first one to get the contract address, and the second one to get the from, to, and token amount
I have no idea how to get the contract address if the sender using a router or somehow other contracts, probably there are other events to track