Great idea and it works not only in theory
So no more reasons to have centralized NFTs 
The URI function needs to be overwritten like this:
import "@openzeppelin/contracts/utils/Strings.sol"
function uri(uint256 _tokenID) override public view returns (string memory) {
string memory hexstringtokenID;
hexstringtokenID = uint2hexstr(_tokenID);
return string(
abi.encodePacked(
"ipfs://f0",
hexstringtokenID)
);
}
Here is an [example](https://soenkeba.medium.com/truly-decentralized-nfts-by-erc-1155-b9be28db2aae).