My second tought was some "Vote To Refund" scheme, applying to any transaction, but the problem would be that people could spread false screenshots of ransomware just to get free services/products.
Go brainstorm about ideas on how to prevent ransomware on bitcoin's end.
This would require a central entity to verify everything and it makes Bitcoin centralised, not a solution.
The problem with ransomware that uses Bitcoin is that it isn't Bitcoin's fault. Bitcoin is not the reason that ransomware exist. The problem is with the user having no protection against them. Use antiviruses and practice good security and you will be fine. Bitcoin cannot be changed to prevent this kind of things.