Not even close. You are very much limited by what each chain's VM allows. The bitcoin VM is extremely limited. The EVM lifts most of those limitations. All of the VMs have a fee you pay based on the complexity of your program, too.
You are also limited in what cryptography you can do because all of the data involved has to be public - so no private keys can be involved in that computation if you want them to stay private.
Take the example of transaction fees on sale of NFTs. A lot of NFT creators wanted to be able to take X% of the sale price of NFTs as an ongoing royalty. Here's how that might have to happen if you did it algorithmically:
1. You initiate an NFT transfer that requires the creator's signature to be processed
2. You pay a fee to the creator and provide proof of the purchase price to get them to sign the transaction
3. The creator signs your transaction, completing it
This step involves trusting the creator to do (3). You cannot automatically do (3) without the creator's private key being on-chain.
Note that if it were a flat fee, there would be no problem - the transfer transaction would be able to auto-deduct the ETH from your account and move it to the creator's, but the variable fee creates problems.