Im building a simple lending-borrowing protocol, using yield-generating and debt tokenization pattern, and for users liquidation when its position is undercollateralized, i want to liquidate part of his collateral within the protocol without third party's assistance ( because a little bit complex since i want to keep the protocol simple). Is there any alternative to achieve this purpose without liquidating more than i have to liquidate, and also without risking the health of the protocol either .
Because you are designing your own protocol, it is up to you to decide then the liquidations are checked. Because your protocol is not public and not well known, only you can answer the question of how this can be achieved. In theory, there should not be any issues you designing smart contracts any way you wish.