The TL;DR answer is: Yes it is totally possible, but as far as I know not implemented in any lightning node software at this time.
However I wish to elaborate a little bit. In your question you wrote:
The reasons could be that forwarding a payment will require it to forward the htlc, fulfill it as well as compute the onion for routing to the next node which might be computationally draining
When I accept a payment I have to go through all of these steps! I have to accept an incoming update_add_htlc message which contains an onion. Then I have to decrypt the onion and if I have the preimage release the payment_preimage to settle / fulfill the onion.
I can safe a little bit on computing the next onion but that is not more complex than decrypting the incoming onion which I would have to do in any case. So the savings might be tiny here.
you also asked:
If the failure rate is too high, is there something like a banscore that is being kept by other nodes that might prevent this sensor node from receiving/sending payments in the future?
I believe Alex Bosworth from lnd announced that starting with the next major version (I guess that should be lnd 0.8) they want to start keeping track of who are good and poor routing nodes and create an internal score which will be used in route computation. In that way they plan to go a way from the cheapest routing fess but rather to metrics like realiability and uptime.
The BOLTs actually do not specify how pathfinding is supposed to be computed, so any implementation can do what ever they wish on this end.
One last thought. There are people working on hardware wallet for lightning one policy for those wallets is to be the other way around of what you ask. Have the private keys on the node for allowing routing of payments but if a new payment is supposed to be send have an air gaped device that helps to sign the messages which are needed.
All that being said it is totally possible that a node decides to only implement part of the protocol. However sending and receiving are exactly the messages and parts of the protocols that are needed for routing anyway (since a payment is coming in by accepting an htlc) and a payment is going out by offering an htlc. It is actually the ability to send payments that currently make the maintenance of a lightning node expense since they need to participate in gossip (which is the most costly operation) in order to participate in source based routing which is needed to initiate a payment.
If you just want to be a routing node you can totally opt out of gossip and just maintain your payment channels and state which comes at extremely low cost.
Is this not the use case for private channels. (Channels with
announceset to0in theopen_channelmessage)? If you are not routing payments, there is no need for your channels to be public. – Mark H – 2019-08-01T09:31:52.777@MarkH Check my comment on Christian's answer. – Ugam Kamat – 2019-08-01T11:34:13.600