I don't think it would be hard to do this thing but this is how I think it will work:
Assume an item costs in total:
5 iron ore,
3 copper ore,
10 stone
Disregarding all the complexities of assembly machines and modules and modded buildings, let the net worth is cost of ore of every item (ores, and not iron plates). Forget all smelting costs, energy cost.
Let c be the amount of credits of selling the product, net worth, w = c - 5x iron ore cost - 3x copper ore cost - 10x stone cost,
We would get c credits and spend (each item's quantities x its cost) regardless of smelting times and energy involved in processing the product, which I think is independent of the way we process it?
Can this idea be done?
I know c and each item's cost varies but if that costs processing time (in game) or update the game every time (I don't think is worth it) or update it every (Factorio month)?