Is there a way to toggle a secure lock screen without having the feature built into a custom ROM?
I'm not too familar with doing stuff like this, but I guess this will help!
Well, I'm pretty sure the app called Tasker is able to do it if the Android version is between 4.x.x and 6.x.x, not sure if Automate can do it?
I do personally recommend Tasker if you want an app that is able to do a lot on your phone, even without ROOT it can do amazing stuff. Else I would recommend to give Automate a try, I'm not that familar with it and can't tell that much about it.
Tasker

Cost's 3 USD!
Create and sell your own apps!
I don't know what it can't do! I'm not kidding!

Automate

It's free to download and ad-free!
Easy-to-use drag-n-drop design!
Built-in community to download other user's uploaded automation tasks!

Both

Automating what ever you want, just like you want!
Use ROOT functions like executing shell commands or rebooting you phone!

Sorry for my bad english if it's not good enough! At least, I tried my best!
EDIT: I'm not able to tell you that any app can help you with a Nexus 6 because I do only have a Galaxy S7 Edge that is working and a Galaxy S5 without a working display.