This dosn’t require prior stopping of the pipeline and not asks confirmation.
Too simple = dangerous, because if some pipeline will be created then from same source, will be necessary to care about correct reprocessing of the old data (not too trivial task).
At least, better will to be able to drop only stopped pipeline.
Second, which built-in pipeline function can I use in procedure ?
I see your point, but DROP TABLE is similar. DROP PIPELINE is a powerful developer tool & does what you tell it to do without confirmation.
START and STOP pipeline work in SPs but CREATE PIPELINE does not. Is there something specific you want to do with pipelines in an SP that doesn’t work for you?