to answer to your question: you can do that by using a scripted syntax within your declarative pipeline currentBuild.rawBuild.getParent().setDisabled(true)
and currentBuild.rawBuild.getParent().setDisabled(false)
. As described already here: Jenkins Pipeline: how can I disable the current job from inside a pipeline?
Place the re-enable part of code it in the following, post stage or whatever specific place you need.
Alternative: In case you're mainly looking for "disabling build queue" - take a look at this answer which providesa a workaroud Disable scheduling another build if previous one is running in Jenkins (as there is no native way to disable queue job builds, afaik).
Another possible solution?
But if you're mainly interested in disabling job concurrency and you don't mind having an upcoming job in a queue, I'd suggest using natively supported feature in Jenkins named Disable concurrent build
.
You can either set in your pipeline options:
pipeline {
options {
disableConcurrentBuilds()
}
// stages and other pipeline code...
}
or enable it via GUI in job configuration.

This leads to a state that any other job run would be put in a queue first and wait till the previous would finish (and as you described that would include waiting for the nested triggered job from your step #1 (this is a default behavior when triggering one job within another via statement build 'job_name'
)).
Maybe another data, parameter validation would be needed in this case (if you actually don't want to trigger a build that came meanwhile runtime of another). But regarding the pipeline configuration it seems to me somehow cleaner as you don't need special security approval, neither using any kind of workaround.